From b605553e28fd51cd39cc3d2a503477c44ab9bd43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Sun, 22 Sep 2013 21:35:38 +0200 Subject: [PATCH] ws2_32/tests: Don't test function directly when reporting WSAGetLastError(). --- 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 343fd9474ae..b085f0b617b 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);