Skip to content

Commit

Permalink
thread: fix win32 thrd_create return values (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers authored Sep 4, 2022
1 parent deec0a8 commit 9e90af1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/thread/win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ int thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
uintptr_t handle;

if (!thr || !func)
return EINVAL;
return thrd_error;

th = mem_alloc(sizeof(struct thread), NULL);
if (!th)
return ENOMEM;
return thrd_nomem;

th->func = func;
th->arg = arg;
Expand Down

0 comments on commit 9e90af1

Please sign in to comment.