fetch/ftp.c: fix a cast that caught clang via -Wcast-qual.

This commit is contained in:
Juan RP 2010-10-27 00:17:08 +02:00
parent 418ee6eec4
commit c49bd80e20

View File

@ -140,7 +140,7 @@ unmappedaddr(struct sockaddr_in6 *sin6, socklen_t *len)
!IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) !IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr))
return; return;
sin4 = (struct sockaddr_in *)sin6; sin4 = (struct sockaddr_in *)sin6;
addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12]; addr = *(uint8_t *)&sin6->sin6_addr.s6_addr[12];
port = sin6->sin6_port; port = sin6->sin6_port;
memset(sin4, 0, sizeof(struct sockaddr_in)); memset(sin4, 0, sizeof(struct sockaddr_in));
sin4->sin_addr.s_addr = addr; sin4->sin_addr.s_addr = addr;