summaryrefslogtreecommitdiffstats
path: root/sbin/kldload/kldload.c
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2016-04-19 04:52:51 +0000
committeraraujo <araujo@FreeBSD.org>2016-04-19 04:52:51 +0000
commitf3d1782e9ef259f21f76edc94e70164aafd0a4b5 (patch)
tree33f5a50765c2ec2884eb26301a58f60463cb03be /sbin/kldload/kldload.c
parent7f18be1ecd41ca337cd3da8751bd2eec1d0a651a (diff)
downloadFreeBSD-src-f3d1782e9ef259f21f76edc94e70164aafd0a4b5.zip
FreeBSD-src-f3d1782e9ef259f21f76edc94e70164aafd0a4b5.tar.gz
Use nitems() from sys/param.h.
MFC after: 2 weeks.
Diffstat (limited to 'sbin/kldload/kldload.c')
-rw-r--r--sbin/kldload/kldload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/kldload/kldload.c b/sbin/kldload/kldload.c
index 3891f33..fd75647 100644
--- a/sbin/kldload/kldload.c
+++ b/sbin/kldload/kldload.c
@@ -74,7 +74,7 @@ path_check(const char *kldname, int quiet)
dev = sb.st_dev;
ino = sb.st_ino;
- miblen = sizeof(mib) / sizeof(mib[0]);
+ miblen = nitems(mib);
if (sysctlnametomib(PATHCTL, mib, &miblen) != 0) {
err(1, "sysctlnametomib(%s)", PATHCTL);
}
OpenPOWER on IntegriCloud