]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bug 1234979 addition
authorGeorg Brandl <georg@python.org>
Sat, 9 Jul 2005 15:27:05 +0000 (15:27 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 9 Jul 2005 15:27:05 +0000 (15:27 +0000)
Python/thread_wince.h

index b5129b2149d2a16189052117ea0a747602623abd..e16f5d14155d387a84a15453a5cb2e2e6802f0b3 100644 (file)
@@ -140,13 +140,13 @@ int PyThread_acquire_lock(PyThread_type_lock aLock, int waitflag)
     dprintf(("%ld: PyThread_acquire_lock(%p, %d) called\n", PyThread_get_thread_ident(),aLock, waitflag));
 
 #ifndef DEBUG
-    waitResult = WaitForSingleObject(aLock, (waitflag == 1 ? INFINITE : 0));
+    waitResult = WaitForSingleObject(aLock, (waitflag ? INFINITE : 0));
 #else
        /* To aid in debugging, we regularly wake up.  This allows us to
        break into the debugger */
        while (TRUE) {
                waitResult = WaitForSingleObject(aLock, waitflag ? 3000 : 0);
-               if (waitflag==0 || (waitflag==1 && waitResult == WAIT_OBJECT_0))
+               if (waitflag==0 || (waitflag && waitResult == WAIT_OBJECT_0))
                        break;
        }
 #endif