rpcrt4/tests: Fix NULL string handling in an ok() check
André Hentschel
nerv at dawncrow.de
Mon Aug 29 14:10:12 CDT 2011
Should stop the crash on Solaris and maybe others
---
dlls/rpcrt4/tests/rpc.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c
index bdc1579..d914c97 100644
--- a/dlls/rpcrt4/tests/rpc.c
+++ b/dlls/rpcrt4/tests/rpc.c
@@ -594,8 +594,10 @@ static void test_RpcStringBindingParseA(void)
ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq);
ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr);
ok(!strcmp((char *)endpoint, "pipetest"), "endpoint should have been pipetest instead of %s\n", endpoint);
- todo_wine
- ok(options && !strcmp((char *)options, ""), "options should have been \"\" of \"%s\"\n", options);
+ if (options)
+ ok(!strcmp((char *)options, ""), "options should have been \"\" of \"%s\"\n", options);
+ else
+ todo_wine ok(FALSE, "options is NULL\n");
RpcStringFreeA(&uuid);
RpcStringFreeA(&protseq);
RpcStringFreeA(&network_addr);
@@ -609,8 +611,10 @@ static void test_RpcStringBindingParseA(void)
ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq);
ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr);
ok(!strcmp((char *)endpoint, "pipetest"), "endpoint should have been pipetest instead of %s\n", endpoint);
- todo_wine
- ok(options && !strcmp((char *)options, ""), "options should have been \"\" of \"%s\"\n", options);
+ if (options)
+ ok(!strcmp((char *)options, ""), "options should have been \"\" of \"%s\"\n", options);
+ else
+ todo_wine ok(FALSE, "options is NULL\n");
RpcStringFreeA(&uuid);
RpcStringFreeA(&protseq);
RpcStringFreeA(&network_addr);
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list