aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-02-04 18:41:18 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-02-04 18:41:18 +0100
commit12ca080a1ca8dfd0aeac54485451b906a7e61b16 (patch)
treeabb273fb03a73bc9c20d05f9128bdfd9bfe55e55 /networking/udhcp
parent98a4c7cf3d799ab953cb77e8b34597c73e3e7335 (diff)
downloadbusybox-w32-12ca080a1ca8dfd0aeac54485451b906a7e61b16.tar.gz
busybox-w32-12ca080a1ca8dfd0aeac54485451b906a7e61b16.tar.bz2
busybox-w32-12ca080a1ca8dfd0aeac54485451b906a7e61b16.zip
*: eliminate more aliasing warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp')
-rw-r--r--networking/udhcp/arpping.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c
index 548796e2b..cf18153f7 100644
--- a/networking/udhcp/arpping.c
+++ b/networking/udhcp/arpping.c
@@ -87,6 +87,7 @@ int FAST_FUNC arpping(uint32_t test_nip,
87 /* wait for arp reply, and check it */ 87 /* wait for arp reply, and check it */
88 timeout_ms = 2000; 88 timeout_ms = 2000;
89 do { 89 do {
90 typedef uint32_t aliased_uint32_t FIX_ALIASING;
90 int r; 91 int r;
91 unsigned prevTime = monotonic_ms(); 92 unsigned prevTime = monotonic_ms();
92 93
@@ -107,7 +108,7 @@ int FAST_FUNC arpping(uint32_t test_nip,
107 && arp.operation == htons(ARPOP_REPLY) 108 && arp.operation == htons(ARPOP_REPLY)
108 /* don't check it: Linux doesn't return proper tHaddr (fixed in 2.6.24?) */ 109 /* don't check it: Linux doesn't return proper tHaddr (fixed in 2.6.24?) */
109 /* && memcmp(arp.tHaddr, from_mac, 6) == 0 */ 110 /* && memcmp(arp.tHaddr, from_mac, 6) == 0 */
110 && *((uint32_t *) arp.sInaddr) == test_nip 111 && *(aliased_uint32_t*)arp.sInaddr == test_nip
111 ) { 112 ) {
112 /* if ARP source MAC matches safe_mac 113 /* if ARP source MAC matches safe_mac
113 * (which is client's MAC), then it's not a conflict 114 * (which is client's MAC), then it's not a conflict