summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2016-04-19 06:34:31 +0000
committeraraujo <araujo@FreeBSD.org>2016-04-19 06:34:31 +0000
commit9d4d4d7d3ad29b8e35fc2f51c595ce10a908ba41 (patch)
tree9106560660dd313ea55800244fdc9fb6b23c4a9d
parentfd1c51c97be1b9f86fbbecec6ead896e73a35280 (diff)
downloadFreeBSD-src-9d4d4d7d3ad29b8e35fc2f51c595ce10a908ba41.zip
FreeBSD-src-9d4d4d7d3ad29b8e35fc2f51c595ce10a908ba41.tar.gz
Use nitems() from sys/param.h.
MFC after: 2 weeks.
-rw-r--r--sbin/ping6/ping6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c
index 7e1719a..5cbc77c 100644
--- a/sbin/ping6/ping6.c
+++ b/sbin/ping6/ping6.c
@@ -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]);
OpenPOWER on IntegriCloud