Michael Stefaniuc : kernel32/tests: Simplify an ok() condition (PVS-Studio ).

Alexandre Julliard julliard at wine.codeweavers.com
Wed Oct 28 10:16:14 CDT 2015


Module: wine
Branch: master
Commit: bcff50a9d476a03b93e21577d76288833900e39a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bcff50a9d476a03b93e21577d76288833900e39a

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Oct 28 11:21:13 2015 +0100

kernel32/tests: Simplify an ok() condition (PVS-Studio).

Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

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

diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c
index cbd276b..97ec794 100644
--- a/dlls/kernel32/tests/comm.c
+++ b/dlls/kernel32/tests/comm.c
@@ -941,7 +941,8 @@ static void test_waittxempty(void)
         evtmask = 0;
         SetLastError(0xdeadbeef);
         res = WaitCommEvent(hcom, &evtmask, &ovl_wait);
-        ok((!res && GetLastError() == ERROR_IO_PENDING) || res /* busy system */, "%d: WaitCommEvent error %d\n", i, GetLastError());
+        ok(res /* busy system */ || GetLastError() == ERROR_IO_PENDING,
+           "%d: WaitCommEvent error %d\n", i, GetLastError());
 
         res = WaitForSingleObject(ovl_wait.hEvent, TIMEOUT);
         if (i == 0)




More information about the wine-cvs mailing list