Merge r51043 and r51044
[reactos.git] / reactos / dll / win32 / kernel32 / file / npipe.c
index c014773..8915fb1 100644 (file)
@@ -501,19 +501,19 @@ WaitNamedPipeW(LPCWSTR lpNamedPipeName,
     }
 
     /* Check what timeout we got */
-    if (nTimeOut == NMPWAIT_USE_DEFAULT_WAIT)
+    if (nTimeOut == NMPWAIT_WAIT_FOREVER)
     {
         /* Don't use a timeout */
         WaitPipe.TimeoutSpecified = FALSE;
     }
     else
     {
-        /* Check if we should wait forever */
-        if (nTimeOut == NMPWAIT_WAIT_FOREVER)
+        /* Check if default */
+        if (nTimeOut == NMPWAIT_USE_DEFAULT_WAIT)
         {
-            /* Set the max */
+            /* Set it to 0 */
             WaitPipe.Timeout.LowPart = 0;
-            WaitPipe.Timeout.HighPart = 0x80000000;
+            WaitPipe.Timeout.HighPart = 0;
         }
         else
         {