Module: wine Branch: master Commit: d0067a5dc109858a7e41233cb218be6842e7af8c URL: http://source.winehq.org/git/wine.git/?a=commit;h=d0067a5dc109858a7e41233cb2...
Author: Peter Urbanec winehq.org@urbanec.net Date: Tue May 31 13:14:21 2011 +1000
ws2_32/tests: Use WSAGetLastError() when reporting errors.
---
dlls/ws2_32/tests/sock.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 3116a0d..07803ff 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -2328,18 +2328,18 @@ static void test_select(void) SetLastError(0); ret = select(maxfd+1, 0, 0, 0, &select_timeout); ok ( (ret == SOCKET_ERROR), "expected SOCKET_ERROR, got %i\n", ret); - ok ( GetLastError() == WSAEINVAL, "expected WSAEINVAL, got %i\n", ret); + ok ( WSAGetLastError() == WSAEINVAL, "expected WSAEINVAL, got %i\n", WSAGetLastError());
SetLastError(0); ret = select(maxfd+1, &readfds, &writefds, &exceptfds, &select_timeout); ok ( (ret == SOCKET_ERROR), "expected SOCKET_ERROR, got %i\n", ret); - ok ( GetLastError() == WSAEINVAL, "expected WSAEINVAL, got %i\n", ret); + ok ( WSAGetLastError() == WSAEINVAL, "expected WSAEINVAL, got %i\n", WSAGetLastError());
FD_SET(INVALID_SOCKET, &readfds); SetLastError(0); ret = select(maxfd+1, &readfds, &writefds, &exceptfds, &select_timeout); ok ( (ret == SOCKET_ERROR), "expected SOCKET_ERROR, got %i\n", ret); - ok ( GetLastError() == WSAENOTSOCK, "expected WSAENOTSOCK, got %i\n", ret); + ok ( WSAGetLastError() == WSAENOTSOCK, "expected WSAENOTSOCK, got %i\n", WSAGetLastError()); ok ( !FD_ISSET(fdRead, &readfds), "FD should not be set\n");
FD_ZERO(&readfds); @@ -2347,7 +2347,7 @@ static void test_select(void) SetLastError(0); ret = select(maxfd+1, &readfds, &writefds, &exceptfds, &select_timeout); ok ( (ret == SOCKET_ERROR), "expected SOCKET_ERROR, got %i\n", ret); - ok ( GetLastError() == WSAENOTSOCK, "expected WSAENOTSOCK, got %i\n", ret); + ok ( WSAGetLastError() == WSAENOTSOCK, "expected WSAENOTSOCK, got %i\n", WSAGetLastError()); ok ( !FD_ISSET(fdRead, &writefds), "FD should not be set\n");
FD_ZERO(&writefds); @@ -2355,7 +2355,7 @@ static void test_select(void) SetLastError(0); ret = select(maxfd+1, &readfds, &writefds, &exceptfds, &select_timeout); ok ( (ret == SOCKET_ERROR), "expected SOCKET_ERROR, got %i\n", ret); - ok ( GetLastError() == WSAENOTSOCK, "expected WSAENOTSOCK, got %i\n", ret); + ok ( WSAGetLastError() == WSAENOTSOCK, "expected WSAENOTSOCK, got %i\n", WSAGetLastError()); ok ( !FD_ISSET(fdRead, &exceptfds), "FD should not be set\n"); }