Alexandre Julliard : rpcrt4/tests: Fix an uninitialized pointer check for Win64.

Alexandre Julliard julliard at winehq.org
Sat Jan 10 11:16:32 CST 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Jan  9 18:08:57 2009 +0100

rpcrt4/tests: Fix an uninitialized pointer check for Win64.

---

 dlls/rpcrt4/tests/rpc_async.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/rpcrt4/tests/rpc_async.c b/dlls/rpcrt4/tests/rpc_async.c
index a540b90..64f0daf 100644
--- a/dlls/rpcrt4/tests/rpc_async.c
+++ b/dlls/rpcrt4/tests/rpc_async.c
@@ -34,6 +34,7 @@ static void test_RpcAsyncInitializeHandle(void)
     RPC_ASYNC_STATE async;
     RPC_STATUS status;
     int i;
+    void *unset_ptr;
 
     status = pRpcAsyncInitializeHandle((PRPC_ASYNC_STATE)buffer, sizeof(buffer));
     ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status);
@@ -42,6 +43,7 @@ static void test_RpcAsyncInitializeHandle(void)
     ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status);
 
     memset(&async, 0xcc, sizeof(async));
+    memset(&unset_ptr, 0xcc, sizeof(unset_ptr));
     status = pRpcAsyncInitializeHandle(&async, sizeof(async));
     ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status);
 
@@ -50,7 +52,7 @@ static void test_RpcAsyncInitializeHandle(void)
     ok(async.Lock == 0, "async.Lock should be 0, but is %d instead\n", async.Lock);
     ok(async.Flags == 0, "async.Flags should be 0, but is %d instead\n", async.Flags);
     ok(async.StubInfo == NULL, "async.StubInfo should be NULL, not %p\n", async.StubInfo);
-    ok(async.UserInfo == (void *)0xcccccccc, "async.UserInfo should be unset, not %p\n", async.UserInfo);
+    ok(async.UserInfo == unset_ptr, "async.UserInfo should be unset, not %p\n", async.UserInfo);
     ok(async.RuntimeInfo == NULL, "async.RuntimeInfo should be NULL, not %p\n", async.RuntimeInfo);
     ok(async.Event == 0xcccccccc, "async.Event should be unset, not %d\n", async.Event);
     ok(async.NotificationType == 0xcccccccc, "async.NotificationType should be unset, not %d\n", async.NotificationType);




More information about the wine-cvs mailing list