Commit b605553e authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

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

parent 7e65578b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment