diff options
author | Dominick Meglio <dcm5151@esu.edu> | 2005-05-17 04:18:41 +0000 |
---|---|---|
committer | Dominick Meglio <dcm5151@esu.edu> | 2005-05-17 04:18:41 +0000 |
commit | 4ee0e56440755277a0db257324f267648c9a0265 (patch) | |
tree | f35f9f91454d154e66174b976e2980abdbf509a9 /ares_getnameinfo.c | |
parent | fc985720197f9ed3184974664d5dca61cf3ad826 (diff) | |
download | c-ares-4ee0e56440755277a0db257324f267648c9a0265.tar.gz c-ares-4ee0e56440755277a0db257324f267648c9a0265.tar.bz2 c-ares-4ee0e56440755277a0db257324f267648c9a0265.zip |
More compiler warning cleanups
Diffstat (limited to 'ares_getnameinfo.c')
-rw-r--r-- | ares_getnameinfo.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c index 3b8ca1d..4eeed94 100644 --- a/ares_getnameinfo.c +++ b/ares_getnameinfo.c @@ -22,6 +22,7 @@ #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> +#include <arpa/inet.h> #include <arpa/nameser.h> #ifdef HAVE_ARPA_NAMESER_COMPAT_H #include <arpa/nameser_compat.h> @@ -32,6 +33,10 @@ #include <net/if.h> #endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -250,7 +255,7 @@ static char *lookup_service(unsigned short port, int flags, char *buf) else { struct servent *se; - char *proto; + const char *proto; if (flags & ARES_NI_UDP) proto = "udp"; @@ -319,7 +324,7 @@ static char *ares_striendstr(const char *s1, const char *s2) c2++; } } - if (c2 == c1 == NULL) + if (c2 == c1 && c2 == NULL) return (char *)c1_begin; return NULL; } |