diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-11-20 07:50:48 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-11-20 07:50:48 +0000 |
commit | acf5ca090a5f445b1a077c76f9372f84df85e48e (patch) | |
tree | 7233ea4a3d6bd3e378192f73cc1e961974be435f /ares_gethostbyname.c | |
parent | 5ff47a7b1d61d3017586000147076090c12d9e96 (diff) | |
download | c-ares-acf5ca090a5f445b1a077c76f9372f84df85e48e.tar.gz c-ares-acf5ca090a5f445b1a077c76f9372f84df85e48e.tar.bz2 c-ares-acf5ca090a5f445b1a077c76f9372f84df85e48e.zip |
use unsigned short better intead of mixing with ints to prevent compiler
warnings
Diffstat (limited to 'ares_gethostbyname.c')
-rw-r--r-- | ares_gethostbyname.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ares_gethostbyname.c b/ares_gethostbyname.c index 9662db5..53ca2d9 100644 --- a/ares_gethostbyname.c +++ b/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. */ |