*: eliminate more aliasing warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -87,6 +87,7 @@ int FAST_FUNC arpping(uint32_t test_nip,
|
||||
/* wait for arp reply, and check it */
|
||||
timeout_ms = 2000;
|
||||
do {
|
||||
typedef uint32_t aliased_uint32_t FIX_ALIASING;
|
||||
int r;
|
||||
unsigned prevTime = monotonic_ms();
|
||||
|
||||
@@ -107,7 +108,7 @@ int FAST_FUNC arpping(uint32_t test_nip,
|
||||
&& arp.operation == htons(ARPOP_REPLY)
|
||||
/* don't check it: Linux doesn't return proper tHaddr (fixed in 2.6.24?) */
|
||||
/* && memcmp(arp.tHaddr, from_mac, 6) == 0 */
|
||||
&& *((uint32_t *) arp.sInaddr) == test_nip
|
||||
&& *(aliased_uint32_t*)arp.sInaddr == test_nip
|
||||
) {
|
||||
/* if ARP source MAC matches safe_mac
|
||||
* (which is client's MAC), then it's not a conflict
|
||||
|
Reference in New Issue
Block a user