localui/tests: make sure to use return values (LLVM/Clang) (try 2)

Austin English austinenglish at gmail.com
Tue Feb 8 17:50:47 CST 2011


This time, without checking GetLastError().

-- 
-Austin
-------------- next part --------------
diff --git a/dlls/localui/tests/localui.c b/dlls/localui/tests/localui.c
index cb7a1cf..59ac3b5 100644
--- a/dlls/localui/tests/localui.c
+++ b/dlls/localui/tests/localui.c
@@ -71,9 +71,10 @@ static PORT_INFO_2W * find_portinfo2(LPWSTR pPort)
 
     if (!pi_buffer) {
         res = EnumPortsW(NULL, 2, NULL, 0, &pi_needed, &pi_numports);
+        ok(!res, "EnumPorts failed: got %d\n", res);
         pi_buffer = HeapAlloc(GetProcessHeap(), 0, pi_needed);
-        SetLastError(0xdeadbeef);
         res = EnumPortsW(NULL, 2, pi_buffer, pi_needed, &pi_needed, &pi_numports);
+        ok(res == 1, "EnumPorts failed: got %d\n", res);
     }
     if (pi_buffer) {
         pi = (PORT_INFO_2W *) pi_buffer;


More information about the wine-patches mailing list