]> granicus.if.org Git - curl/commitdiff
Fix compiler warning
authorYang Tse <yangsita@gmail.com>
Thu, 8 Oct 2009 17:06:08 +0000 (17:06 +0000)
committerYang Tse <yangsita@gmail.com>
Thu, 8 Oct 2009 17:06:08 +0000 (17:06 +0000)
ares/ares__get_hostent.c

index d98af92835853de57e795433cf6a2d4e3691dba4..4371c5bf7fe07ce0598c28681a1dbcc4a91b1cc9 100644 (file)
@@ -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 *));