nuttx: replace all ARRAY_SIZE()/ARRAYSIZE() to nitems()

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-02-02 20:31:22 +08:00
committed by Xiang Xiao
parent cf0769d613
commit 3a0fdb019d
95 changed files with 291 additions and 451 deletions
+1 -4
View File
@@ -30,6 +30,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <sys/uio.h>
#include <sys/param.h>
#include <nuttx/net/netconfig.h>
#include <nuttx/compiler.h>
@@ -38,10 +39,6 @@
* Pre-processor Definitions
****************************************************************************/
#ifndef ARRAY_SIZE
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
/* Event message flags */
#define USRSOCK_EVENT_ABORT (1 << 1)
+1 -1
View File
@@ -328,7 +328,7 @@
.user_data = (&(struct _bt_gatt_ccc_s) \
{ \
.cfg = _cfg, \
.cfg_len = ARRAY_SIZE(_cfg), \
.cfg_len = nitems(_cfg), \
.value_handle = _value_handle, \
.cfg_changed = _cfg_changed, \
}),\