diff options
author | Dominick Meglio <dcm5151@esu.edu> | 2005-05-16 19:14:25 +0000 |
---|---|---|
committer | Dominick Meglio <dcm5151@esu.edu> | 2005-05-16 19:14:25 +0000 |
commit | ef16aa066980ff2c7fb26fbebe0db61eaeb96566 (patch) | |
tree | a9061f18edd8b3a5149288cb9409bfedcf924ce1 /ares_getnameinfo.c | |
parent | aba0b775ea30596d8666e8e403d2efb8f647358d (diff) | |
download | c-ares-ef16aa066980ff2c7fb26fbebe0db61eaeb96566.tar.gz c-ares-ef16aa066980ff2c7fb26fbebe0db61eaeb96566.tar.bz2 c-ares-ef16aa066980ff2c7fb26fbebe0db61eaeb96566.zip |
Cleaned up some compile warnings
Diffstat (limited to 'ares_getnameinfo.c')
-rw-r--r-- | ares_getnameinfo.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c index 955207a..3b8ca1d 100644 --- a/ares_getnameinfo.c +++ b/ares_getnameinfo.c @@ -14,6 +14,7 @@ */ #include "setup.h" #include <sys/types.h> +#include <ctype.h> #if defined(WIN32) && !defined(WATT32) #include "nameser.h" @@ -63,7 +64,9 @@ struct nameinfo_query { static void nameinfo_callback(void *arg, int status, struct hostent *host); static char *lookup_service(unsigned short port, int flags, char *buf); +#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID static char *append_scopeid(struct sockaddr_in6 *addr6, unsigned int scopeid, char *buf); +#endif static char *ares_striendstr(const char *s1, const char *s2); void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, socklen_t salen, @@ -206,7 +209,7 @@ static void nameinfo_callback(void *arg, int status, struct hostent *host) *end = 0; } } - callback(niquery->arg, ARES_SUCCESS, host->h_name, service); + niquery->callback(niquery->arg, ARES_SUCCESS, host->h_name, service); return; } /* We couldn't find the host, but it's OK, we can use the IP */ @@ -230,10 +233,10 @@ static void nameinfo_callback(void *arg, int status, struct hostent *host) else service = lookup_service(niquery->addr.addr6.sin6_port, niquery->flags, srvbuf); } - callback(niquery->arg, ARES_SUCCESS, ipbuf, service); + niquery->callback(niquery->arg, ARES_SUCCESS, ipbuf, service); return; } - callback(niquery->arg, status, NULL, NULL); + niquery->callback(niquery->arg, status, NULL, NULL); free(niquery); } @@ -317,6 +320,6 @@ static char *ares_striendstr(const char *s1, const char *s2) } } if (c2 == c1 == NULL) - return c1_begin; + return (char *)c1_begin; return NULL; } |