From e19229ad983ae382a9726299a04a0ea20abe36c5 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sat, 24 Feb 2007 14:05:21 +0000 Subject: [PATCH] (empth_create) [_WIN32]: Fix the error return code check for the call to _beginthread() to check for 1L instead of -1. --- src/lib/empthread/ntthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/empthread/ntthread.c b/src/lib/empthread/ntthread.c index edb80e5b..a7115435 100644 --- a/src/lib/empthread/ntthread.c +++ b/src/lib/empthread/ntthread.c @@ -455,7 +455,7 @@ empth_create(int prio, void (*entry)(void *), int size, int flags, size = loc_MIN_THREAD_STACK; 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)); goto bad; }