diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2023-11-07 17:11:56 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2024-04-29 03:24:47 +0000 |
commit | 338d9c35d55dd69c02d2d7d887ee658eaa667bac (patch) | |
tree | 2a97a903e75e706dad71a833523b36dc17d152c1 /usr.sbin | |
parent | 8f65dcd6276bf139a2fe87c1bbeffcc1fed015e4 (diff) | |
download | src-338d9c35d55dd69c02d2d7d887ee658eaa667bac.tar.gz src-338d9c35d55dd69c02d2d7d887ee658eaa667bac.zip |
kbdcontrol: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/kbdcontrol/kbdcontrol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c index e55165fd0888..4e27febe2164 100644 --- a/usr.sbin/kbdcontrol/kbdcontrol.c +++ b/usr.sbin/kbdcontrol/kbdcontrol.c @@ -1117,7 +1117,7 @@ get_kbd_type_name(int type) }; unsigned int i; - for (i = 0; i < sizeof(name_table)/sizeof(name_table[0]); ++i) { + for (i = 0; i < nitems(name_table); ++i) { if (type == name_table[i].type) return name_table[i].name; } |