mirror of
https://github.com/curl/curl.git
synced 2026-08-26 22:34:45 +03:00
Fix compiler warning
This commit is contained in:
parent
0077a6d51b
commit
b4e6418aef
1 changed files with 2 additions and 2 deletions
|
|
@ -189,9 +189,9 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
||||||
if (!hostent->h_addr_list[0])
|
if (!hostent->h_addr_list[0])
|
||||||
break;
|
break;
|
||||||
if (addrfam == AF_INET)
|
if (addrfam == AF_INET)
|
||||||
memcpy(hostent->h_addr_list[0], &addr, addrlen);
|
memcpy(hostent->h_addr_list[0], &addr, sizeof(struct in_addr));
|
||||||
else
|
else
|
||||||
memcpy(hostent->h_addr_list[0], &addr6, addrlen);
|
memcpy(hostent->h_addr_list[0], &addr6, sizeof(struct in6_addr));
|
||||||
|
|
||||||
/* Copy aliases. */
|
/* Copy aliases. */
|
||||||
hostent->h_aliases = malloc((((size_t)naliases) + 1) * sizeof(char *));
|
hostent->h_aliases = malloc((((size_t)naliases) + 1) * sizeof(char *));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue