svn commit: r321090 - stable/10/sys/dev/vt/hw/vga
Ngie Cooper
ngie at FreeBSD.org
Mon Jul 17 21:09:37 UTC 2017
Author: ngie
Date: Mon Jul 17 21:09:35 2017
New Revision: 321090
URL: https://svnweb.freebsd.org/changeset/base/321090
Log:
MFC r319928:
Use nitems(..) when computing `max` instead of the longhand version of
the same logic
Modified:
stable/10/sys/dev/vt/hw/vga/vt_vga.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c
==============================================================================
--- stable/10/sys/dev/vt/hw/vga/vt_vga.c Mon Jul 17 21:09:31 2017 (r321089)
+++ stable/10/sys/dev/vt/hw/vga/vt_vga.c Mon Jul 17 21:09:35 2017 (r321090)
@@ -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)
More information about the svn-src-all
mailing list