Fixed bug #29769 (sys_check_timeouts: sys_now() may overflow)

This commit is contained in:
goldsimon
2010-05-04 19:27:42 +00:00
parent abc36471d9
commit 71f5fdef42
3 changed files with 11 additions and 2 deletions

View File

@@ -370,8 +370,8 @@ sys_check_timeouts(void)
now = sys_now();
if (next_timeout) {
/* @todo: wrap around? */
diff = now - timeouts_last_time;
/* this cares for wraparounds */
diff = LWIP_U32_DIFF(now, timeouts_last_time);
do
{
had_one = 0;