pud: fix alignment warning
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 24 Oct 2012 08:51:43 +0000 (10:51 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 24 Oct 2012 08:52:52 +0000 (10:52 +0200)
src/netTools.c: In function 'getIPv4Address':
src/netTools.c:102:11: warning: cast increases required alignment of target type [-Wcast-align]

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/src/netTools.c

index 9535270..b5c6812 100644 (file)
@@ -99,5 +99,5 @@ struct in_addr * getIPv4Address(const char * ifName, struct ifreq *ifr) {
 
        close(fd);
 
-       return &((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr;
+       return &((struct sockaddr_in *)(void *) &ifr->ifr_addr)->sin_addr;
 }