ws2_32/tests: Don't test function directly when reporting WSAGetLastError().
This commit is contained in:
parent
7e65578b7c
commit
b605553e28
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue