Просмотр исходного кода

ble_mesh: stack: Update ARRAY_SIZE definition

lly 5 лет назад
Родитель
Сommit
85ec75b970
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h

+ 1 - 3
components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h

@@ -57,9 +57,7 @@ extern "C" {
  * an array (e.g. pointer)
  * an array (e.g. pointer)
  */
  */
 #ifndef ARRAY_SIZE
 #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
 #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