Alexandre Julliard : kernel32/tests: Use the correct value for invalid heap sizes on 64-bit.
Alexandre Julliard
julliard at winehq.org
Fri Jan 2 08:25:49 CST 2009
Module: wine
Branch: master
Commit: 02229896bee41309156a8be0a26139105807a495
URL: http://source.winehq.org/git/wine.git/?a=commit;h=02229896bee41309156a8be0a26139105807a495
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Jan 2 12:20:53 2009 +0100
kernel32/tests: Use the correct value for invalid heap sizes on 64-bit.
---
dlls/kernel32/tests/heap.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c
index c196c23..4aa6b7e 100644
--- a/dlls/kernel32/tests/heap.c
+++ b/dlls/kernel32/tests/heap.c
@@ -64,13 +64,13 @@ START_TEST(heap)
/* test some border cases of HeapAlloc and HeapReAlloc */
mem = HeapAlloc(GetProcessHeap(), 0, 0);
ok(mem != NULL, "memory not allocated for size 0\n");
- msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~0UL - 7);
- ok(msecond == NULL, "HeapReAlloc(0xfffffff8) should have failed\n");
- msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~0UL);
- ok(msecond == NULL, "HeapReAlloc(0xffffffff) should have failed\n");
+ msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~(SIZE_T)0 - 7);
+ ok(msecond == NULL, "HeapReAlloc(~0 - 7) should have failed\n");
+ msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~(SIZE_T)0);
+ ok(msecond == NULL, "HeapReAlloc(~0) should have failed\n");
HeapFree(GetProcessHeap(), 0, mem);
- mem = HeapAlloc(GetProcessHeap(), 0, ~0UL);
- ok(mem == NULL, "memory allocated for size ~0UL\n");
+ mem = HeapAlloc(GetProcessHeap(), 0, ~(SIZE_T)0);
+ ok(mem == NULL, "memory allocated for size ~0\n");
/* large blocks must be 16-byte aligned */
mem = HeapAlloc(GetProcessHeap(), 0, 512 * 1024);
More information about the wine-cvs
mailing list