dlls/kernel32/tests/alloc.c -- remove useless check

Gerald Pfeifer gerald at pfeifer.com
Sat Dec 29 14:09:43 CST 2007


As it's name already indicates (dw = double word = unsigned), dwSize 
always is positive so the test for >= is useless.

Gerald

ChangeLog:
Remove extraneous check.

Index: dlls/kernel32/tests/alloc.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel32/tests/alloc.c,v
retrieving revision 1.2
diff -u -3 -p -r1.2 alloc.c
--- dlls/kernel32/tests/alloc.c	10 Oct 2006 18:19:57 -0000	1.2
+++ dlls/kernel32/tests/alloc.c	29 Dec 2007 20:08:06 -0000
@@ -150,8 +150,7 @@ static void test_Heap(void)
 
    dwSize = HeapSize(heap, 0, mem1);
    /* should work with 0-length buffer */
-   ok((dwSize >= 0) && (dwSize < 0xFFFFFFFF),
-      "The size of the 0-length buffer\n");
+   ok(dwSize < 0xFFFFFFFF, "The size of the 0-length buffer\n");
    ok(HeapFree(heap, 0, mem1), "Freed the 0-length buffer\n");
 
 /* Check that HeapDestry works */



More information about the wine-patches mailing list