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

Alexandre Julliard julliard at wine.codeweavers.com
Fri Nov 27 08:20:48 CST 2015


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

Author: André Hentschel <nerv at dawncrow.de>
Date:   Thu Nov 26 23:04:53 2015 +0100

ws2_32/tests: Don't test function directly when reporting WSAGetLastError().

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

---

 dlls/ws2_32/tests/sock.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index f483197..00fac77 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -6575,8 +6575,8 @@ static void test_WSAPoll(void)
     ok(POLL_ISSET(fdRead, POLLWRNORM), "fdRead socket events incorrect\n");
     len = sizeof(id);
     id = 0xdeadbeef;
-    ok(!getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char*)&id, &len),
-       "getsockopt failed with %d\n",WSAGetLastError());
+    err = getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char*)&id, &len);
+    ok(!err, "getsockopt failed with %d\n", WSAGetLastError());
     ok(id == 0, "expected 0, got %d\n", id);
 
     /* Test data receiving notifications */
@@ -6655,8 +6655,8 @@ static void test_WSAPoll(void)
     ok(ret == 0, "expected 0, got %d\n", ret);
     len = sizeof(id);
     id = 0xdeadbeef;
-    ok(!getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char*)&id, &len),
-       "getsockopt failed with %d\n", WSAGetLastError());
+    err = getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char*)&id, &len);
+    ok(!err, "getsockopt failed with %d\n", WSAGetLastError());
     ok(id == WSAECONNREFUSED, "expected 10061, got %d\n", id);
     closesocket(fdWrite);
 




More information about the wine-cvs mailing list