mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
ble_mesh: stack: Update ARRAY_SIZE definition
This commit is contained in:
@ -56,9 +56,7 @@ extern "C" {
|
|||||||
* an array (e.g. pointer)
|
* an array (e.g. pointer)
|
||||||
*/
|
*/
|
||||||
#ifndef ARRAY_SIZE
|
#ifndef ARRAY_SIZE
|
||||||
#define ARRAY_SIZE(array) \
|
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||||
((unsigned long) (IS_ARRAY(array) + \
|
|
||||||
(sizeof(array) / sizeof((array)[0]))))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Evaluates to 1 if ptr is part of array, 0 otherwise; compile error if
|
/* Evaluates to 1 if ptr is part of array, 0 otherwise; compile error if
|
||||||
|
Reference in New Issue
Block a user