=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: wsdapi/tests: Don' t test function directly when reporting WSAGetLastError().

Alexandre Julliard julliard at winehq.org
Tue Jan 2 13:19:01 CST 2018


Module: wine
Branch: master
Commit: 748c7b85931b365897667e0714b8c6e380e22e77
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=748c7b85931b365897667e0714b8c6e380e22e77

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sat Dec 30 19:59:38 2017 +0100

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

Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wsdapi/tests/address.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/wsdapi/tests/address.c b/dlls/wsdapi/tests/address.c
index 1dbe266..66293e7 100644
--- a/dlls/wsdapi/tests/address.c
+++ b/dlls/wsdapi/tests/address.c
@@ -246,6 +246,7 @@ static void GetSetSockaddr_udp_tests(void)
     IWSDUdpAddress *udpAddress = NULL;
     LPCWSTR returnedAddress = NULL;
     char addressBuffer[MAX_PATH];
+    const char *cret;
     WSADATA wsaData;
     WORD port = 0;
     HRESULT rc;
@@ -294,7 +295,8 @@ static void GetSetSockaddr_udp_tests(void)
     /* Windows however doesn't set the port number */
     ok(sockAddr6Ptr->sin6_port == 0, "returnedStorage.sin6_port != 0 (%d)\n", sockAddr6Ptr->sin6_port);
 
-    ok(inet_ntop(returnedStorage.ss_family, &sockAddr6Ptr->sin6_addr, addressBuffer, MAX_PATH) != NULL, "inet_ntop failed (%d)\n", WSAGetLastError());
+    cret = inet_ntop(returnedStorage.ss_family, &sockAddr6Ptr->sin6_addr, addressBuffer, MAX_PATH);
+    ok(cret != NULL, "inet_ntop failed (%d)\n", WSAGetLastError());
     ok(strcmp(addressBuffer, ipv6Address) == 0, "returnedStorage.sin6_addr != '%s' ('%s')\n", ipv6Address, addressBuffer);
 
     /* Release the object and create a new one */




More information about the wine-cvs mailing list