diff options
author | ngie <ngie@FreeBSD.org> | 2017-07-17 21:09:35 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-07-17 21:09:35 +0000 |
commit | be92ed015df779198a1509eea392548fbf9704b3 (patch) | |
tree | 5d263baef3919c4cfa25be692c5005fd41ddd525 | |
parent | 8e8d962834bccc7009c14bfdee0d61357e1266a1 (diff) | |
download | FreeBSD-src-be92ed015df779198a1509eea392548fbf9704b3.zip FreeBSD-src-be92ed015df779198a1509eea392548fbf9704b3.tar.gz |
MFC r319928:
Use nitems(..) when computing `max` instead of the longhand version of
the same logic
-rw-r--r-- | sys/dev/vt/hw/vga/vt_vga.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/vt/hw/vga/vt_vga.c b/sys/dev/vt/hw/vga/vt_vga.c index 43f5647..1679c59 100644 --- a/sys/dev/vt/hw/vga/vt_vga.c +++ b/sys/dev/vt/hw/vga/vt_vga.c @@ -283,7 +283,7 @@ vga_get_cp437(term_char_t c) int min, mid, max; min = 0; - max = (sizeof(cp437table) / sizeof(struct unicp437)) - 1; + max = nitems(cp437table) - 1; if (c < cp437table[0].unicode_base || c > cp437table[max].unicode_base + cp437table[max].length) |