[PATCH] setupapi/tests: Don't test functions directly when reporting GetLastError()

André Hentschel nerv at dawncrow.de
Sun Jun 9 11:17:20 CDT 2019


Signed-off-by: André Hentschel <nerv at dawncrow.de>
---
 dlls/setupapi/tests/devinst.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index f266592e3f9..430dede6531 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -200,7 +200,8 @@ static void test_install_class(void)
     ret = SetupDiInstallClassA(NULL, tmpfile, 0, NULL);
     ok(ret, "Failed to install class, error %#x.\n", GetLastError());
 
-    ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey), "Failed to delete class key, error %u.\n", GetLastError());
+    ret = RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey);
+    ok(!ret, "Failed to delete class key, error %u.\n", GetLastError());
     DeleteFileA(tmpfile);
 }
 
-- 
2.17.1





More information about the wine-devel mailing list