[svn] w32pth - r47 - trunk

svn author marcus cvs at cvs.gnupg.org
Thu Dec 2 00:18:45 CET 2010


Author: marcus
Date: 2010-12-02 00:18:44 +0100 (Thu, 02 Dec 2010)
New Revision: 47

Modified:
   trunk/ChangeLog
   trunk/w32-pth.c
Log:
2010-12-02  Marcus Brinkmann  <marcus at g10code.com>

	* w32-pth.c (w32ce_timer_thread): Oops.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-12-01 14:32:20 UTC (rev 46)
+++ trunk/ChangeLog	2010-12-01 23:18:44 UTC (rev 47)
@@ -1,3 +1,7 @@
+2010-12-02  Marcus Brinkmann  <marcus at g10code.com>
+
+	* w32-pth.c (w32ce_timer_thread): Oops.  (Fix last change.)
+
 2010-12-01  Marcus Brinkmann  <marcus at g10code.com>
 
 	* w32-pth.c (w32ce_timer_thread): Use earliest timer, not latest.

Modified: trunk/w32-pth.c
===================================================================
--- trunk/w32-pth.c	2010-12-01 14:32:20 UTC (rev 46)
+++ trunk/w32-pth.c	2010-12-01 23:18:44 UTC (rev 47)
@@ -511,7 +511,7 @@
 static DWORD CALLBACK 
 w32ce_timer_thread (void *arg)
 {
-  int idx, any;
+  int idx;
   DWORD timeout, elapsed, lasttick;
 
   (void)arg;
@@ -520,21 +520,18 @@
   for (;;)
     {
       elapsed = lasttick;  /* Get start time.  */
-      timeout = 0;
+      timeout = INFINITE;
       EnterCriticalSection (&w32ce_timer_cs);
-      for (idx=any=0; idx < DIM (w32ce_timer); idx++)
+      for (idx=0; idx < DIM (w32ce_timer); idx++)
         {
           if (w32ce_timer[idx].event && w32ce_timer[idx].active)
             {
-              any = 1;
               if (w32ce_timer[idx].remaining < timeout)
                 timeout = w32ce_timer[idx].remaining;
             }
         }
       LeaveCriticalSection (&w32ce_timer_cs);
-      if (!any)
-        timeout = INFINITE;
-      else if (timeout > 0x7fffffff)
+      if (timeout != INFINITE && timeout > 0x7fffffff)
         timeout = 0x7fffffff;
       switch (WaitForSingleObject (w32ce_timer_ev, (DWORD)timeout))
         {





More information about the Gnupg-commits mailing list