eliminate aliasing warnings in traceroute.c and udhcp/socket.c

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2011-01-20 12:13:23 +01:00
parent b3b6c8bdf2
commit dd169e8468
2 changed files with 16 additions and 12 deletions

View File

@@ -751,7 +751,8 @@ print(int read_len, const struct sockaddr *from, const struct sockaddr *to)
} else
#endif
{
read_len -= ((struct ip*)recv_pkt)->ip_hl << 2;
struct ip *ip4packet = (struct ip*)recv_pkt;
read_len -= ip4packet->ip_hl << 2;
}
printf(" %d bytes to %s", read_len, ina);
free(ina);