udhcp: protect agianst timer overflowing 32-bit counter
function old new delta arpping 398 387 -11
This commit is contained in:
parent
f3aa4a8ec5
commit
b89e2027d9
@ -106,7 +106,7 @@ int arpping(uint32_t test_ip, uint32_t from_ip, uint8_t *from_mac, const char *i
|
||||
break;
|
||||
}
|
||||
}
|
||||
timeout_ms -= (monotonic_us() - prevTime) / 1000;
|
||||
timeout_ms -= ((unsigned)monotonic_us() - prevTime) / 1000;
|
||||
} while (timeout_ms > 0);
|
||||
|
||||
ret:
|
||||
|
Loading…
Reference in New Issue
Block a user