Use nitems() macro instead of re-inventing it

Fixed after r301221.

Pointed out by:	oshogbo
Submitted by:	Michal Stanek <mst@semihalf.com>
Obtained from:	Semihalf
This commit is contained in:
zbb 2016-06-03 18:52:57 +00:00
parent 93978535c1
commit 08f6ef2014

View File

@ -2131,7 +2131,7 @@ win_cpu_from_dt(void)
return (0);
t++;
if (t >= ((sizeof(cpu_win_tbl))/(sizeof(cpu_win_tbl[0])))) {
if (t >= nitems(cpu_win_tbl)) {
debugf("cannot fit CESA tuple into cpu_win_tbl\n");
return (ENOMEM);
}