From beec6930e7281e7784063d0558b71803cf316543 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sat, 16 Jul 2016 07:49:30 +0000 Subject: [PATCH] [WS2_32] - Fix a few ws2_32:getaddrinfo test failures. Based on a patch by Peter Hater. CORE-11368 svn path=/trunk/; revision=71951 --- reactos/dll/win32/ws2_32/misc/ns.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/reactos/dll/win32/ws2_32/misc/ns.c b/reactos/dll/win32/ws2_32/misc/ns.c index d729dfceb34..9383d4e2198 100644 --- a/reactos/dll/win32/ws2_32/misc/ns.c +++ b/reactos/dll/win32/ws2_32/misc/ns.c @@ -1605,23 +1605,20 @@ getaddrinfo(const char FAR * nodename, struct sockaddr_in *sin; INT error; - if (res == NULL) - { - error = WSAEINVAL; - goto End; - } - if (nodename == NULL && servname == NULL) - { - error = WSAHOST_NOT_FOUND; - goto End; - } - if (!WSAINITIALIZED) { error = WSANOTINITIALISED; goto End; } + *res = NULL; + + if (nodename == NULL && servname == NULL) + { + error = WSAHOST_NOT_FOUND; + goto End; + } + if (servname) { /* converting port number */