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:
parent
93978535c1
commit
08f6ef2014
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user