aboutsummaryrefslogtreecommitdiff
path: root/ares/ares_gethostbyaddr.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-04-14 12:53:53 +0000
committerYang Tse <yangsita@gmail.com>2009-04-14 12:53:53 +0000
commitc382c550e7d8ad54d2c35b0fea9d0eef09ff3a25 (patch)
tree4a55cc0951de068e16c9e016bdb8b70fde9c6473 /ares/ares_gethostbyaddr.c
parentc663494c69e81f8d88ccf8dad7e4ae3ef726e9d8 (diff)
fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value
Diffstat (limited to 'ares/ares_gethostbyaddr.c')
-rw-r--r--ares/ares_gethostbyaddr.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/ares/ares_gethostbyaddr.c b/ares/ares_gethostbyaddr.c
index bab4b1c73..63abc85e4 100644
--- a/ares/ares_gethostbyaddr.c
+++ b/ares/ares_gethostbyaddr.c
@@ -145,16 +145,23 @@ static void addr_callback(void *arg, int status, int timeouts,
{
struct addr_query *aquery = (struct addr_query *) arg;
struct hostent *host;
+ size_t addrlen;
aquery->timeouts += timeouts;
if (status == ARES_SUCCESS)
{
if (aquery->addr.family == AF_INET)
- status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV4,
- sizeof(struct in_addr), AF_INET, &host);
+ {
+ addrlen = sizeof(struct in_addr);
+ status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV4,
+ (int)addrlen, AF_INET, &host);
+ }
else
- status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV6,
- sizeof(struct in6_addr), AF_INET6, &host);
+ {
+ addrlen = sizeof(struct in6_addr);
+ status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV6,
+ (int)addrlen, AF_INET6, &host);
+ }
end_aquery(aquery, status, host);
}
else if (status == ARES_EDESTRUCTION)