Date: Mon, 17 Jul 2017 21:09:35 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321090 - stable/10/sys/dev/vt/hw/vga Message-ID: <201707172109.v6HL9ZO5054531@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707172109.v6HL9ZO5054531>