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

André Hentschel nerv at dawncrow.de
Sun Sep 25 13:30:42 CDT 2011


---
 dlls/shell32/tests/shlfolder.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index fb634b4..c61a972 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -3784,12 +3784,15 @@ if (0)
     if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE;
     if (is_wow64 && pGetSystemWow64DirectoryW)
     {
+        UINT len;
         *dirW = 0;
-        ok(GetSystemDirectoryW(dirW, MAX_PATH) > 0, "GetSystemDirectoryW failed: %u\n", GetLastError());
+        len = GetSystemDirectoryW(dirW, MAX_PATH);
+        ok(len > 0, "GetSystemDirectoryW failed: %u\n", GetLastError());
         hr = pSHParseDisplayName(dirW, NULL, &pidl1, 0, NULL);
         ok(hr == S_OK, "failed %08x\n", hr);
         *dirW = 0;
-        ok(pGetSystemWow64DirectoryW(dirW, MAX_PATH) > 0, "GetSystemWow64DirectoryW failed: %u\n", GetLastError());
+        len = pGetSystemWow64DirectoryW(dirW, MAX_PATH);
+        ok(len > 0, "GetSystemWow64DirectoryW failed: %u\n", GetLastError());
         hr = pSHParseDisplayName(dirW, NULL, &pidl2, 0, NULL);
         ok(hr == S_OK, "failed %08x\n", hr);
         ret = pILIsEqual(pidl1, pidl2);
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list