ws2_32/tests: Don't test function directly when reporting WSAGetLastError()
André Hentschel
nerv at dawncrow.de
Sun Sep 22 14:35:38 CDT 2013
---
dlls/ws2_32/tests/sock.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index c1d6956..5cec03e 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -2094,7 +2094,7 @@ static void test_WSADuplicateSocket(void)
WSAPROTOCOL_INFOA info;
DWORD err;
struct sockaddr_in addr;
- int socktype, size, addrsize;
+ int socktype, size, addrsize, ret;
char teststr[] = "TEST", buffer[16];
source = WSASocketA(AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0, 0);
@@ -2181,8 +2181,8 @@ static void test_WSADuplicateSocket(void)
ok(dupsock != INVALID_SOCKET, "WSASocketA should have succeeded\n");
size = sizeof(int);
- ok(!getsockopt(dupsock, SOL_SOCKET, SO_TYPE, (char *) &socktype, &size),
- "getsockopt failed with %d\n", WSAGetLastError());
+ ret = getsockopt(dupsock, SOL_SOCKET, SO_TYPE, (char *) &socktype, &size);
+ ok(!ret, "getsockopt failed with %d\n", WSAGetLastError());
ok(socktype == SOCK_DGRAM, "Wrong socket type, expected %d received %d\n",
SOCK_DGRAM, socktype);
--
1.8.1.2
More information about the wine-patches
mailing list