(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:
Ron Koenderink 2007-02-24 14:05:21 +00:00
parent 91504142c3
commit e19229ad98

View file

@ -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;
} }