From c382c550e7d8ad54d2c35b0fea9d0eef09ff3a25 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 14 Apr 2009 12:53:53 +0000 Subject: fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value --- ares/ares__get_hostent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ares/ares__get_hostent.c') 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) -- cgit v1.2.3