aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2005-12-09 22:23:50 +0000
committerYang Tse <yangsita@gmail.com>2005-12-09 22:23:50 +0000
commit4b1a91b64fb8da4d552ddcdd89e4ca7bcc789f03 (patch)
tree5e0dd5053d24798058e056ab3b1b80fe0eec421f /ares
parent4f69318e1289ae6722ba36d7e10b05483170cb6e (diff)
Fix compiler warning
Diffstat (limited to 'ares')
-rw-r--r--ares/ares_getnameinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ares/ares_getnameinfo.c b/ares/ares_getnameinfo.c
index 35e611f47..23ca0cbee 100644
--- a/ares/ares_getnameinfo.c
+++ b/ares/ares_getnameinfo.c
@@ -270,6 +270,7 @@ static char *lookup_service(unsigned short port, int flags,
char buf[4096];
int len = 4096;
#elif GETSERVBYPORT_R_ARGS == 5
+ struct servent ret;
char buf[4096];
int len = 4096;
#elif GETSERVBYPORT_R_ARGS == 4
@@ -291,6 +292,7 @@ static char *lookup_service(unsigned short port, int flags,
if (getservbyport_r(port, proto, se, buf, len, &ret))
se = NULL;
#elif GETSERVBYPORT_R_ARGS == 5
+ se = &ret;
se = getservbyport_r(port, proto, se, buf, len);
#elif GETSERVBYPORT_R_ARGS == 4
se = &ret;