=?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 Sep 25 15:22:01 CDT 2015
Module: wine
Branch: master
Commit: d0a5a32546b600eaabe1c03f0137c418e1fff591
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d0a5a32546b600eaabe1c03f0137c418e1fff591
Author: André Hentschel <nerv at dawncrow.de>
Date: Sat Sep 19 15:42:51 2015 +0200
ws2_32/tests: Don't test function directly when reporting WSAGetLastError().
---
dlls/ws2_32/tests/sock.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 2bcc92e..8a0e375 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -3737,7 +3737,8 @@ static void test_select(void)
ok(FD_ISSET(fdRead, &writefds), "fdRead socket is not in the set\n");
len = sizeof(id);
id = 0xdeadbeef;
- ok(!getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char*)&id, &len), "getsockopt failed with %d\n",WSAGetLastError());
+ ret = getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char*)&id, &len);
+ ok(!ret, "getsockopt failed with %d\n", WSAGetLastError());
ok(id == 0, "expected 0, got %d\n", id);
/* When data is received the receiver gets the read descriptor */
@@ -3821,7 +3822,8 @@ static void test_select(void)
ok(ret == 1, "expected 1, 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());
+ ret = getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char*)&id, &len);
+ ok(!ret, "getsockopt failed with %d\n", WSAGetLastError());
ok(id == WSAECONNREFUSED, "expected 10061, got %d\n", id);
ok(FD_ISSET(fdWrite, &exceptfds), "fdWrite socket is not in the set\n");
ok(select_timeout.tv_usec == 250000, "select timeout should not have changed\n");
More information about the wine-cvs
mailing list