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
+2 -2
View File
@@ -25,6 +25,7 @@
#include <nuttx/config.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <stdio.h>
#include <stdint.h>
@@ -44,7 +45,6 @@
#define ELF_PAGESIZE 4096
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define ROUNDUP(x, y) ((x + (y - 1)) / (y)) * (y)
/****************************************************************************
@@ -244,7 +244,7 @@ static void elf_emit_note_info(FAR struct elf_dumpinfo_s *cinfo)
status.pr_pid = tcb->pid;
for (j = 0; j < ARRAY_SIZE(status.pr_regs); j++)
for (j = 0; j < nitems(status.pr_regs); j++)
{
status.pr_regs[j] = *(uintptr_t *)((uint8_t *)tcb +
g_tcbinfo.reg_off.p[j]);