summaryrefslogtreecommitdiff
path: root/ares_getnameinfo.c
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
commitbc727dff6a1c4c2bf405086f01991604d324505d (patch)
treeecd89d6efc97a3c509e96ead038f6f775cfdecca /ares_getnameinfo.c
parent8e8403987f576d2e053a046050240ec6df12f974 (diff)
downloadc-ares-bc727dff6a1c4c2bf405086f01991604d324505d.tar.gz
c-ares-bc727dff6a1c4c2bf405086f01991604d324505d.tar.bz2
c-ares-bc727dff6a1c4c2bf405086f01991604d324505d.zip
Fix compiler warning
Diffstat (limited to 'ares_getnameinfo.c')
-rw-r--r--ares_getnameinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c
index 35e611f..23ca0cb 100644
--- a/ares_getnameinfo.c
+++ b/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;