summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2017-07-17 21:09:35 +0000
committerngie <ngie@FreeBSD.org>2017-07-17 21:09:35 +0000
commitbe92ed015df779198a1509eea392548fbf9704b3 (patch)
tree5d263baef3919c4cfa25be692c5005fd41ddd525
parent8e8d962834bccc7009c14bfdee0d61357e1266a1 (diff)
downloadFreeBSD-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.c2
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)
OpenPOWER on IntegriCloud