ws2_32: Do not convert EAI_xxx return in case of success

Bruno Jesus 00cpxxx at gmail.com
Thu Dec 26 13:57:05 CST 2013


Fixes bug
http://bugs.winehq.org/show_bug.cgi?id=35235
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20131226/10aac561/attachment.html>
-------------- next part --------------
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index b135aec..cd97a9d 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -5683,7 +5683,7 @@ int WINAPI WS_getnameinfo(const SOCKADDR *sa, WS_socklen_t salen, PCHAR host,
         return WSA_NOT_ENOUGH_MEMORY;
     }
     ret = getnameinfo(&sa_u.addr, size, host, hostlen, serv, servlen, convert_niflag_w2u(flags));
-    return convert_eai_u2w(ret);
+    return ret ? convert_eai_u2w(ret) : 0;
 #else
     FIXME("getnameinfo() failed, not found during buildtime.\n");
     return EAI_FAIL;


More information about the wine-patches mailing list