=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: msvcrt/tests: Don' t test function directly when reporting GetLastError().

Alexandre Julliard julliard at winehq.org
Tue Jan 2 13:19:01 CST 2018


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

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sat Dec 30 19:58:04 2017 +0100

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

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

---

 dlls/msvcrt/tests/time.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcrt/tests/time.c b/dlls/msvcrt/tests/time.c
index bc1c6c8..a5a2df1 100644
--- a/dlls/msvcrt/tests/time.c
+++ b/dlls/msvcrt/tests/time.c
@@ -878,9 +878,10 @@ static void test_clock(void)
     static const int THRESH = 100;
     FILETIME start, cur;
     int c, expect;
+    BOOL ret;
 
-    ok(GetProcessTimes(GetCurrentProcess(), &start, &cur, &cur, &cur),
-        "GetProcessTimes failed with error: %d\n", GetLastError());
+    ret = GetProcessTimes(GetCurrentProcess(), &start, &cur, &cur, &cur);
+    ok(ret, "GetProcessTimes failed with error: %d\n", GetLastError());
     GetSystemTimeAsFileTime(&cur);
     expect = (((LONGLONG)cur.dwHighDateTime<<32)+cur.dwLowDateTime -
             ((LONGLONG)start.dwHighDateTime<<32)-start.dwLowDateTime) / 10000;




More information about the wine-cvs mailing list