(empth_create) [_WIN32]: Fix the error return code check for
the call to _beginthread() to check for 1L instead of -1.
This commit is contained in:
parent
91504142c3
commit
e19229ad98
1 changed files with 1 additions and 1 deletions
|
@ -455,7 +455,7 @@ empth_create(int prio, void (*entry)(void *), int size, int flags,
|
||||||
size = loc_MIN_THREAD_STACK;
|
size = loc_MIN_THREAD_STACK;
|
||||||
|
|
||||||
pThread->ulThreadID = _beginthread(empth_threadMain, size, pThread);
|
pThread->ulThreadID = _beginthread(empth_threadMain, size, pThread);
|
||||||
if (pThread->ulThreadID == -1) {
|
if (pThread->ulThreadID == 1L) {
|
||||||
logerror("can not create thread: %s: %s", name, strerror(errno));
|
logerror("can not create thread: %s: %s", name, strerror(errno));
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue