mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-13 14:40:22 +00:00
Use nitems() from sys/param.h.
MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan)
This commit is contained in:
parent
57185c52de
commit
d19ba08a16
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303545
@ -101,8 +101,7 @@ static const char *pfkey_msgtype_names (int);
|
||||
static const char *
|
||||
pfkey_msgtype_names(int x)
|
||||
{
|
||||
const int max =
|
||||
sizeof(pfkey_msgtypenames)/sizeof(pfkey_msgtypenames[0]);
|
||||
const int max = nitems(pfkey_msgtypenames);
|
||||
static char buf[20];
|
||||
|
||||
if (x < max && pfkey_msgtypenames[x])
|
||||
|
Loading…
Reference in New Issue
Block a user