=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: kernel32/tests: Use BOOL type where appropriate.

Alexandre Julliard julliard at winehq.org
Tue Nov 19 13:28:35 CST 2013


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Tue Nov 19 01:05:54 2013 +0100

kernel32/tests: Use BOOL type where appropriate.

---

 dlls/kernel32/tests/heap.c |    4 ++--
 dlls/kernel32/tests/pipe.c |   16 +++++++++-------
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c
index 4a730c7..111e1f7 100644
--- a/dlls/kernel32/tests/heap.c
+++ b/dlls/kernel32/tests/heap.c
@@ -56,7 +56,7 @@ static SIZE_T resize_9x(SIZE_T size)
 
 static void test_sized_HeapAlloc(int nbytes)
 {
-    int success;
+    BOOL success;
     char *buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nbytes);
     ok(buf != NULL, "allocate failed\n");
     ok(buf[0] == 0, "buffer not zeroed\n");
@@ -66,7 +66,7 @@ static void test_sized_HeapAlloc(int nbytes)
 
 static void test_sized_HeapReAlloc(int nbytes1, int nbytes2)
 {
-    int success;
+    BOOL success;
     char *buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nbytes1);
     ok(buf != NULL, "allocate failed\n");
     ok(buf[0] == 0, "buffer not zeroed\n");
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 30dcc8e..b192f96 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -452,7 +452,7 @@ static DWORD CALLBACK serverThreadMain1(LPVOID arg)
         char buf[512];
         DWORD written;
         DWORD readden;
-        DWORD success;
+        BOOL success;
 
         /* Wait for client to connect */
         trace("Server calling ConnectNamedPipe...\n");
@@ -504,13 +504,15 @@ static DWORD CALLBACK serverThreadMain2(LPVOID arg)
         char buf[512];
         DWORD written;
         DWORD readden;
-        DWORD success;
+        DWORD ret;
+        BOOL success;
+
 
         user_apc_ran = FALSE;
         if (i == 0 && pQueueUserAPC) {
             trace("Queueing an user APC\n"); /* verify the pipe is non alerable */
-            success = pQueueUserAPC(&user_apc, GetCurrentThread(), 0);
-            ok(success, "QueueUserAPC failed: %d\n", GetLastError());
+            ret = pQueueUserAPC(&user_apc, GetCurrentThread(), 0);
+            ok(ret, "QueueUserAPC failed: %d\n", GetLastError());
         }
 
         /* Wait for client to connect */
@@ -587,7 +589,7 @@ static DWORD CALLBACK serverThreadMain3(LPVOID arg)
         DWORD written;
         DWORD readden;
         DWORD dummy;
-        DWORD success;
+        BOOL success;
         OVERLAPPED oOverlap;
         int letWFSOEwait = (i & 2);
         int letGORwait = (i & 1);
@@ -713,7 +715,7 @@ static DWORD CALLBACK serverThreadMain4(LPVOID arg)
         DWORD written;
         DWORD readden;
         DWORD dummy;
-        DWORD success;
+        BOOL success;
         OVERLAPPED oConnect;
         OVERLAPPED oRead;
         OVERLAPPED oWrite;
@@ -837,7 +839,7 @@ static DWORD CALLBACK serverThreadMain5(LPVOID arg)
     for (i = 0; i < NB_SERVER_LOOPS; i++) {
         char buf[512];
         DWORD readden;
-        DWORD success;
+        BOOL success;
         OVERLAPPED oOverlap;
         DWORD err;
 




More information about the wine-cvs mailing list