svn commit: r298256 - head/sbin/ping6
Marcelo Araujo
araujo at FreeBSD.org
Tue Apr 19 06:34:32 UTC 2016
Author: araujo
Date: Tue Apr 19 06:34:31 2016
New Revision: 298256
URL: https://svnweb.freebsd.org/changeset/base/298256
Log:
Use nitems() from sys/param.h.
MFC after: 2 weeks.
Modified:
head/sbin/ping6/ping6.c
Modified: head/sbin/ping6/ping6.c
==============================================================================
--- head/sbin/ping6/ping6.c Tue Apr 19 06:32:35 2016 (r298255)
+++ head/sbin/ping6/ping6.c Tue Apr 19 06:34:31 2016 (r298256)
@@ -2495,7 +2495,7 @@ pr_icmph(struct icmp6_hdr *icp, u_char *
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]);
More information about the svn-src-head
mailing list