mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Fix bug #51238: LWIP_ARRAYSIZE() can't be used on lwip_cyclic_timers
Add const int variable containing number of array elements
This commit is contained in:
parent
7197bf25f0
commit
c923d00340
@ -105,6 +105,7 @@ const struct lwip_cyclic_timer lwip_cyclic_timers[] = {
|
|||||||
#endif /* LWIP_IPV6_MLD */
|
#endif /* LWIP_IPV6_MLD */
|
||||||
#endif /* LWIP_IPV6 */
|
#endif /* LWIP_IPV6 */
|
||||||
};
|
};
|
||||||
|
const int lwip_num_cyclic_timers = LWIP_ARRAYSIZE(lwip_cyclic_timers);
|
||||||
|
|
||||||
#if LWIP_TIMERS && !LWIP_TIMERS_CUSTOM
|
#if LWIP_TIMERS && !LWIP_TIMERS_CUSTOM
|
||||||
|
|
||||||
|
@ -71,8 +71,10 @@ struct lwip_cyclic_timer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** This array contains all stack-internal cyclic timers. To get the number of
|
/** This array contains all stack-internal cyclic timers. To get the number of
|
||||||
* timers, use LWIP_ARRAYSIZE() */
|
* timers, use lwip_num_cyclic_timers */
|
||||||
extern const struct lwip_cyclic_timer lwip_cyclic_timers[];
|
extern const struct lwip_cyclic_timer lwip_cyclic_timers[];
|
||||||
|
/** Array size of lwip_cyclic_timers[] */
|
||||||
|
extern const int lwip_num_cyclic_timers;
|
||||||
|
|
||||||
#if LWIP_TIMERS
|
#if LWIP_TIMERS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user