1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

if2ip: fix -Wcast-align warning

Follow-up to 119037325d, which fixed the
warning in the HAVE_GETIFADDRS block, but not in the
HAVE_IOCTL_SIOCGIFADDR block.
This commit is contained in:
Marcel Raad 2017-04-25 09:19:59 +02:00
parent 80a87e8abc
commit 93567071b7
No known key found for this signature in database
GPG Key ID: B7F13D981BBF1607

View File

@ -239,7 +239,7 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope,
return IF2IP_NOT_FOUND;
}
s = (struct sockaddr_in *)&req.ifr_addr;
s = (struct sockaddr_in *)(void *)&req.ifr_addr;
memcpy(&in, &s->sin_addr, sizeof(in));
Curl_inet_ntop(s->sin_family, &in, buf, buf_size);