mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-29 03:14:04 +00:00
Add assertion that checks for a maximum msecs value for sys_timeout()
This commit is contained in:
parent
990c25d4f3
commit
67ad6e45db
@ -290,6 +290,8 @@ sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg)
|
|||||||
|
|
||||||
LWIP_ASSERT_CORE_LOCKED();
|
LWIP_ASSERT_CORE_LOCKED();
|
||||||
|
|
||||||
|
LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4));
|
||||||
|
|
||||||
next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
|
next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
|
||||||
|
|
||||||
#if LWIP_DEBUG_TIMERNAMES
|
#if LWIP_DEBUG_TIMERNAMES
|
||||||
|
Loading…
Reference in New Issue
Block a user