From c97b66287c41952a2fcb908805768284af3a8e65 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 20 Nov 2008 07:50:48 +0000 Subject: use unsigned short better intead of mixing with ints to prevent compiler warnings --- ares/ares_gethostbyname.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ares/ares_gethostbyname.c') diff --git a/ares/ares_gethostbyname.c b/ares/ares_gethostbyname.c index 9662db5ae..53ca2d94a 100644 --- a/ares/ares_gethostbyname.c +++ b/ares/ares_gethostbyname.c @@ -245,8 +245,8 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac numdots++; } } - - /* if we don't have 3 dots, it is illegal + + /* if we don't have 3 dots, it is illegal * (although inet_addr doesn't think so). */ if (numdots != 3) @@ -293,6 +293,8 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac int ares_gethostbyname_file(ares_channel channel, const char *name, int family, struct hostent **host) { + int result; + /* We only take the channel to ensure that ares_init() been called. */ if(channel == NULL) { @@ -301,11 +303,11 @@ int ares_gethostbyname_file(ares_channel channel, const char *name, *host = NULL; return ARES_ENOTFOUND; } - + /* Just chain to the internal implementation we use here; it's exactly - * what we want. + * what we want. */ - const int result = file_lookup(name, family, host); + result = file_lookup(name, family, host); if(result != ARES_SUCCESS) { /* We guarantee a NULL hostent on failure. */ -- cgit v1.2.3