Use nitems() from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
0bfc2a1246
commit
aa07ba2aad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298245
@ -854,7 +854,7 @@ string(const char *str, char **ans)
|
|||||||
static const char *
|
static const char *
|
||||||
get_type(int type)
|
get_type(int type)
|
||||||
{
|
{
|
||||||
int numentries = (sizeof(part_types)/sizeof(struct part_type));
|
int numentries = (nitems(part_types));
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
struct part_type *ptr = part_types;
|
struct part_type *ptr = part_types;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user