diff options
author | araujo <araujo@FreeBSD.org> | 2016-04-19 06:34:31 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2016-04-19 06:34:31 +0000 |
commit | 9d4d4d7d3ad29b8e35fc2f51c595ce10a908ba41 (patch) | |
tree | 9106560660dd313ea55800244fdc9fb6b23c4a9d | |
parent | fd1c51c97be1b9f86fbbecec6ead896e73a35280 (diff) | |
download | FreeBSD-src-9d4d4d7d3ad29b8e35fc2f51c595ce10a908ba41.zip FreeBSD-src-9d4d4d7d3ad29b8e35fc2f51c595ce10a908ba41.tar.gz |
Use nitems() from sys/param.h.
MFC after: 2 weeks.
-rw-r--r-- | sbin/ping6/ping6.c | 2 |
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]); |