=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: ws2_32/tests: Don' t test function directly when reporting WSAGetLastError().
Alexandre Julliard
julliard at winehq.org
Tue Sep 24 03:22:00 CDT 2013
Module: wine
Branch: master
Commit: b605553e28fd51cd39cc3d2a503477c44ab9bd43
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b605553e28fd51cd39cc3d2a503477c44ab9bd43
Author: André Hentschel <nerv at dawncrow.de>
Date: Sun Sep 22 21:35:38 2013 +0200
ws2_32/tests: Don't test function directly when reporting WSAGetLastError().
---
dlls/ws2_32/tests/sock.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 343fd94..b085f0b 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);
More information about the wine-cvs
mailing list