mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
Change all sizeof(arr)/sizeof(arr[0]) to nitems
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
8e8d58a915
commit
054cf3b1cb
40 changed files with 107 additions and 130 deletions
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/param.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
|
@ -114,7 +115,7 @@ static uint32_t keypad_get_key(int fd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < sizeof(g_keypad_map) / sizeof(struct keypad_map_s); i++)
|
||||
for (i = 0; i < nitems(g_keypad_map); i++)
|
||||
{
|
||||
int bit = g_keypad_map[i].bit;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue