def.h: added LWIP_ARRAYSIZE() macro

This commit is contained in:
goldsimon 2015-10-02 10:05:32 +02:00
parent 180ed573a5
commit 424bd7e38c

View File

@ -49,6 +49,9 @@ extern "C" {
#define LWIP_MAX(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
#define NULL ((void *)0)
#endif