summaryrefslogtreecommitdiff
path: root/ares__get_hostent.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-08 17:06:08 (GMT)
committerYang Tse <yangsita@gmail.com>2009-10-08 17:06:08 (GMT)
commite112f191a3d94510c74ff8a01b6446b61eb4b547 (patch)
tree6e59d19681068e171b52f86fedc8d26166b14c23 /ares__get_hostent.c
parent716d5817dcf828222bf2c7bc166ea7b24c2d515b (diff)
downloadc-ares-e112f191a3d94510c74ff8a01b6446b61eb4b547.zip
c-ares-e112f191a3d94510c74ff8a01b6446b61eb4b547.tar.gz
c-ares-e112f191a3d94510c74ff8a01b6446b61eb4b547.tar.bz2
Fix compiler warning
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 d98af92..4371c5b 100644
--- a/ares__get_hostent.c
+++ b/ares__get_hostent.c
@@ -189,9 +189,9 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
if (!hostent->h_addr_list[0])
break;
if (addrfam == AF_INET)
- memcpy(hostent->h_addr_list[0], &addr, addrlen);
+ memcpy(hostent->h_addr_list[0], &addr, sizeof(struct in_addr));
else
- memcpy(hostent->h_addr_list[0], &addr6, addrlen);
+ memcpy(hostent->h_addr_list[0], &addr6, sizeof(struct in6_addr));
/* Copy aliases. */
hostent->h_aliases = malloc((((size_t)naliases) + 1) * sizeof(char *));