mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-26 11:47:31 +00:00
Use nitems() from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
c52ee6c23b
commit
1068140988
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298256
@ -2495,7 +2495,7 @@ pr_icmph(struct icmp6_hdr *icp, u_char *end)
|
||||
break;
|
||||
}
|
||||
if (options & F_VERBOSE) {
|
||||
if (ni->ni_code > sizeof(nircode) / sizeof(nircode[0]))
|
||||
if (ni->ni_code > nitems(nircode))
|
||||
printf(", invalid");
|
||||
else
|
||||
printf(", %s", nircode[ni->ni_code]);
|
||||
|
Loading…
Reference in New Issue
Block a user