André Hentschel : ole32/tests: Don' t test function directly when reporting GetLastError().

Alexandre Julliard julliard at winehq.org
Fri Dec 31 11:01:03 CST 2010


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

Author: André Hentschel <nerv at dawncrow.de>
Date:   Thu Dec 30 20:02:00 2010 +0100

ole32/tests: Don't test function directly when reporting GetLastError().

---

 dlls/ole32/tests/marshal.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c
index 5563085..25253d3 100644
--- a/dlls/ole32/tests/marshal.c
+++ b/dlls/ole32/tests/marshal.c
@@ -2644,6 +2644,7 @@ static HANDLE create_target_process(const char *arg)
 {
     char **argv;
     char cmdline[MAX_PATH];
+    BOOL ret;
     PROCESS_INFORMATION pi;
     STARTUPINFO si = { 0 };
     si.cb = sizeof(si);
@@ -2652,8 +2653,8 @@ static HANDLE create_target_process(const char *arg)
     pi.hProcess = NULL;
     winetest_get_mainargs( &argv );
     sprintf(cmdline, "%s %s %s", argv[0], argv[1], arg);
-    ok(CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL,
-                     &si, &pi) != 0, "CreateProcess failed with error: %u\n", GetLastError());
+    ret = CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
+    ok(ret, "CreateProcess failed with error: %u\n", GetLastError());
     if (pi.hThread) CloseHandle(pi.hThread);
     return pi.hProcess;
 }




More information about the wine-cvs mailing list