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) ...@@ -2094,7 +2094,7 @@ static void test_WSADuplicateSocket(void)
WSAPROTOCOL_INFOA info; WSAPROTOCOL_INFOA info;
DWORD err; DWORD err;
struct sockaddr_in addr; struct sockaddr_in addr;
int socktype, size, addrsize; int socktype, size, addrsize, ret;
char teststr[] = "TEST", buffer[16]; char teststr[] = "TEST", buffer[16];
source = WSASocketA(AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0, 0); source = WSASocketA(AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0, 0);
...@@ -2181,8 +2181,8 @@ static void test_WSADuplicateSocket(void) ...@@ -2181,8 +2181,8 @@ static void test_WSADuplicateSocket(void)
ok(dupsock != INVALID_SOCKET, "WSASocketA should have succeeded\n"); ok(dupsock != INVALID_SOCKET, "WSASocketA should have succeeded\n");
size = sizeof(int); size = sizeof(int);
ok(!getsockopt(dupsock, SOL_SOCKET, SO_TYPE, (char *) &socktype, &size), ret = getsockopt(dupsock, SOL_SOCKET, SO_TYPE, (char *) &socktype, &size);
"getsockopt failed with %d\n", WSAGetLastError()); ok(!ret, "getsockopt failed with %d\n", WSAGetLastError());
ok(socktype == SOCK_DGRAM, "Wrong socket type, expected %d received %d\n", ok(socktype == SOCK_DGRAM, "Wrong socket type, expected %d received %d\n",
SOCK_DGRAM, socktype); 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