Use nitems(..) when computing max
instead of the longhand version of
the same logic MFC after: 1 month
This commit is contained in:
parent
7e38d220fa
commit
e6b01ed73a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319928
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user