|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.24 2003/11/29 19:51:49 pgsql Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.25 2004/04/24 20:10:34 tgl Exp $ |
12 | 12 | *
|
13 | 13 | * This file and the IPV6 implementation were initially provided by
|
14 | 14 | * Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
|
@@ -67,8 +67,11 @@ static int getnameinfo_unix(const struct sockaddr_un * sa, int salen,
|
67 | 67 | */
|
68 | 68 | int
|
69 | 69 | getaddrinfo_all(constchar*hostname,constchar*servname,
|
70 |
| -conststructaddrinfo*hintp,structaddrinfo**result) |
| 70 | +conststructaddrinfo*hintp,structaddrinfo**result) |
71 | 71 | {
|
| 72 | +/* not all versions of getaddrinfo() zero *result on failure */ |
| 73 | +*result=NULL; |
| 74 | + |
72 | 75 | #ifdefHAVE_UNIX_SOCKETS
|
73 | 76 | if (hintp!=NULL&&hintp->ai_family==AF_UNIX)
|
74 | 77 | returngetaddrinfo_unix(servname,hintp,result);
|
|