ws2_32: Pass NULL nodename on to native getaddrinfo.

This commit is contained in:
Hans Leidekker 2011-11-24 11:31:35 +01:00 committed by Alexandre Julliard
parent ad5340f63a
commit 8e5d5bf58a
1 changed files with 4 additions and 3 deletions

View File

@ -4824,14 +4824,15 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr
if (!nodename && !servname) return WSAHOST_NOT_FOUND; if (!nodename && !servname) return WSAHOST_NOT_FOUND;
if (!nodename) if (!nodename)
node = "localhost"; node = NULL;
else if (!nodename[0]) else if (!nodename[0])
{
node = hostname = get_hostname(); node = hostname = get_hostname();
if (!node) return WSA_NOT_ENOUGH_MEMORY;
}
else else
node = nodename; node = nodename;
if (!node) return WSA_NOT_ENOUGH_MEMORY;
if (hints) { if (hints) {
punixhints = &unixhints; punixhints = &unixhints;