summaryrefslogtreecommitdiff
path: root/ares__get_hostent.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-08 00:02:32 (GMT)
committerYang Tse <yangsita@gmail.com>2009-10-08 00:02:32 (GMT)
commit716d5817dcf828222bf2c7bc166ea7b24c2d515b (patch)
treeafbbb9d1798927e3e7892bdcbd8a631e4ae98f9d /ares__get_hostent.c
parentc2d3e82931e6406f725a3da83fa11f3bc1b3aac7 (diff)
downloadc-ares-716d5817dcf828222bf2c7bc166ea7b24c2d515b.zip
c-ares-716d5817dcf828222bf2c7bc166ea7b24c2d515b.tar.gz
c-ares-716d5817dcf828222bf2c7bc166ea7b24c2d515b.tar.bz2
Fix compiler warning: addition result could be truncated before cast to bigger sized type
Diffstat (limited to 'ares__get_hostent.c')
-rw-r--r--ares__get_hostent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ares__get_hostent.c b/ares__get_hostent.c
index 8402714..d98af92 100644
--- a/ares__get_hostent.c
+++ b/ares__get_hostent.c
@@ -194,7 +194,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
memcpy(hostent->h_addr_list[0], &addr6, addrlen);
/* Copy aliases. */
- hostent->h_aliases = malloc((naliases + 1) * sizeof(char *));
+ hostent->h_aliases = malloc((((size_t)naliases) + 1) * sizeof(char *));
if (!hostent->h_aliases)
break;
alias = hostent->h_aliases;