Author: ngie
Date: Wed Jun 14 02:28:10 2017
New Revision: 319928
URL: https://svnweb.freebsd.org/changeset/base/319928
Log:
Use nitems(..) when computing `max` instead of the longhand version of
the same logic
MFC after: 1 month
Modified:
head/sys/dev/vt/hw/vga/vt_vga.c
Modified: head/sys/dev/vt/hw/vga/vt_vga.c
==============================================================================
--- head/sys/dev/vt/hw/vga/vt_vga.c Wed Jun 14 01:59:41 2017
(r319927)
+++ head/sys/dev/vt/hw/vga/vt_vga.c Wed Jun 14 02:28:10 2017
(r319928)
@@ -288,7 +288,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)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"