Bruno Jesus : ws2_32: Remove duplicated code.

Alexandre Julliard julliard at winehq.org
Mon Nov 28 14:00:12 CST 2011


Module: wine
Branch: master
Commit: fc09bc4533c1c6fbf31b825367b80ec79f2ace36
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fc09bc4533c1c6fbf31b825367b80ec79f2ace36

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Sat Nov 26 20:43:03 2011 -0200

ws2_32: Remove duplicated code.

---

 dlls/ws2_32/async.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/ws2_32/async.c b/dlls/ws2_32/async.c
index 01d5d48..cc330bb 100644
--- a/dlls/ws2_32/async.c
+++ b/dlls/ws2_32/async.c
@@ -269,10 +269,10 @@ static HANDLE run_query( HWND hWnd, UINT uMsg, LPTHREAD_START_ROUTINE func,
 {
     static LONG next_handle = 0xdead;
     HANDLE thread;
-    ULONG handle = LOWORD( InterlockedIncrement( &next_handle ));
-
-    /* avoid handle 0 */
-    while (!handle) handle = LOWORD( InterlockedIncrement( &next_handle ));
+    ULONG handle;
+    do
+        handle = LOWORD( InterlockedIncrement( &next_handle ));
+    while (!handle); /* avoid handle 0 */
 
     query->hWnd    = hWnd;
     query->uMsg    = uMsg;




More information about the wine-cvs mailing list