mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-03 17:11:32 +00:00
Divine the array size by using 'nitems(array)' instead of using magic numbers.
Suggested by: Garrett Cooper
This commit is contained in:
parent
a5e67727fb
commit
d72323d1d9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244530
@ -42,7 +42,7 @@ static const char rcsid[] =
|
||||
#define EXTENDED_PROCESSING_READY
|
||||
#define OEM_PROCESSING_READY_NOT
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <err.h>
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
@ -710,10 +710,12 @@ MPConfigTableHeader( u_int32_t pap )
|
||||
|
||||
printf( "MP Config Base Table Entries:\n\n" );
|
||||
|
||||
/* initialze tables */
|
||||
for ( x = 0; x < 256; ++x ) {
|
||||
busses[ x ] = apics[ x ] = 0xff;
|
||||
}
|
||||
/* initialize tables */
|
||||
for (x = 0; x < (int)nitems(busses); x++)
|
||||
busses[x] = 0xff;
|
||||
|
||||
for (x = 0; x < (int)nitems(apics); x++)
|
||||
apics[x] = 0xff;
|
||||
|
||||
ncpu = 0;
|
||||
nbus = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user