aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-09 11:55:58 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-09 11:55:58 +0000
commitb89e2027d9cff6ca660f3230e680e41f061b148a (patch)
tree59b69d72ca499bdb805c227c852f77be0eb8ab78
parentf3aa4a8ec5c86ceef9a82647a47f6ebec2766747 (diff)
downloadbusybox-b89e2027d9cff6ca660f3230e680e41f061b148a.tar.gz
udhcp: protect agianst timer overflowing 32-bit counter
function old new delta arpping 398 387 -11
-rw-r--r--networking/udhcp/arpping.c2
1 files changed, 1 insertions, 1 deletions
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: