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)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to