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