summaryrefslogtreecommitdiff
path: root/ares__get_hostent.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-04-14 12:53:53 (GMT)
committerYang Tse <yangsita@gmail.com>2009-04-14 12:53:53 (GMT)
commit737707bf4bc37017ffce685dbe088a9cd359a3d4 (patch)
tree8a3c8401b05953bd1c31367e41f2cae8cb355706 /ares__get_hostent.c
parent382dc0d71995a0b44c94cace70f317eb6ae860a3 (diff)
downloadc-ares-737707bf4bc37017ffce685dbe088a9cd359a3d4.zip
c-ares-737707bf4bc37017ffce685dbe088a9cd359a3d4.tar.gz
c-ares-737707bf4bc37017ffce685dbe088a9cd359a3d4.tar.bz2
fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value
Diffstat (limited to 'ares__get_hostent.c')
-rw-r--r--ares__get_hostent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ares__get_hostent.c b/ares__get_hostent.c
index c14919a..90fd88f 100644
--- a/ares__get_hostent.c
+++ b/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)