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

Alexandre Julliard julliard at winehq.org
Mon Jan 6 15:38:00 CST 2020


Module: wine
Branch: master
Commit: 2114a4dd9b4fa41a4df4c835531c81af028dfbcd
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2114a4dd9b4fa41a4df4c835531c81af028dfbcd

Author: André Hentschel <nerv at dawncrow.de>
Date:   Mon Jan  6 14:22:13 2020 +0100

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

Found with Coccinelle.

Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/advapi32/tests/security.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 8bcd16cb95..d52afb8c82 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -7346,7 +7346,8 @@ static void test_child_token_sd(void)
     ok(acl->AceCount, "Expected at least one ACE\n");
     for (i = 0; i < acl->AceCount; i++)
     {
-        ok(pGetAce(acl, i, (void **)&acc_ace), "GetAce failed with error %u\n", GetLastError());
+        ret = pGetAce(acl, i, (void **)&acc_ace);
+        ok(ret, "GetAce failed with error %u\n", GetLastError());
         ok(acc_ace->Header.AceType != ACCESS_ALLOWED_ACE_TYPE || !EqualSid(&acc_ace->SidStart, psid),
            "ACE inherited from the parent\n");
     }




More information about the wine-cvs mailing list