From b89e2027d9cff6ca660f3230e680e41f061b148a Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 9 May 2008 11:55:58 +0000 Subject: udhcp: protect agianst timer overflowing 32-bit counter function old new delta arpping 398 387 -11 --- networking/udhcp/arpping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'networking/udhcp') diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c index 45597c04b..a8a458468 100644 --- a/networking/udhcp/arpping.c +++ b/networking/udhcp/arpping.c @@ -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: -- cgit v1.2.3