From 392fb4b916ee392b89ff969c566cfd30b188fcca Mon Sep 17 00:00:00 2001 From: lly Date: Fri, 4 Dec 2020 11:42:15 +0800 Subject: [PATCH] ble_mesh: stack: Update ARRAY_SIZE definition --- components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h b/components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h index a1643e7d83..198d1589a5 100644 --- a/components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h +++ b/components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h @@ -56,9 +56,7 @@ extern "C" { * an array (e.g. pointer) */ #ifndef ARRAY_SIZE -#define ARRAY_SIZE(array) \ - ((unsigned long) (IS_ARRAY(array) + \ - (sizeof(array) / sizeof((array)[0])))) +#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) #endif /* Evaluates to 1 if ptr is part of array, 0 otherwise; compile error if