mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-06 18:54:18 +00:00
def.h: added LWIP_ARRAYSIZE() macro
This commit is contained in:
parent
180ed573a5
commit
424bd7e38c
@ -49,6 +49,9 @@ extern "C" {
|
|||||||
#define LWIP_MAX(x , y) (((x) > (y)) ? (x) : (y))
|
#define LWIP_MAX(x , y) (((x) > (y)) ? (x) : (y))
|
||||||
#define LWIP_MIN(x , y) (((x) < (y)) ? (x) : (y))
|
#define LWIP_MIN(x , y) (((x) < (y)) ? (x) : (y))
|
||||||
|
|
||||||
|
/* Get the number of entries in an array ('x' must NOT be a pointer!) */
|
||||||
|
#define LWIP_ARRAYSIZE(x) (sizeof(x)/sizeof((x)[0]))
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL ((void *)0)
|
#define NULL ((void *)0)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user