mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
nuttx: replace all ARRAY_SIZE()/ARRAYSIZE() to nitems()
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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, \
|
||||
}),\
|
||||
|
||||
Reference in New Issue
Block a user