diff options
author | Yang Tse <yangsita@gmail.com> | 2009-04-14 12:53:53 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-04-14 12:53:53 +0000 |
commit | c382c550e7d8ad54d2c35b0fea9d0eef09ff3a25 (patch) | |
tree | 4a55cc0951de068e16c9e016bdb8b70fde9c6473 /ares/ares__get_hostent.c | |
parent | c663494c69e81f8d88ccf8dad7e4ae3ef726e9d8 (diff) |
fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value
Diffstat (limited to 'ares/ares__get_hostent.c')
-rw-r--r-- | ares/ares__get_hostent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ares/ares__get_hostent.c b/ares/ares__get_hostent.c index c14919a97..90fd88f48 100644 --- a/ares/ares__get_hostent.c +++ b/ares/ares__get_hostent.c @@ -47,7 +47,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host) int status, linesize, end_at_hostname, naliases; struct in_addr addr; struct in6_addr addr6; - int addrlen = sizeof(struct in_addr); + size_t addrlen = sizeof(struct in_addr); struct hostent *hostent = NULL; while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) @@ -162,7 +162,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host) hostent->h_aliases[naliases] = NULL; hostent->h_addrtype = family; - hostent->h_length = addrlen; + hostent->h_length = (int)addrlen; if (family == AF_INET) memcpy(hostent->h_addr_list[0], &addr, addrlen); else if (family == AF_INET6) |