svn commit: r298249 - head/sbin/kldload
Marcelo Araujo
araujo at FreeBSD.org
Tue Apr 19 04:52:52 UTC 2016
Author: araujo
Date: Tue Apr 19 04:52:51 2016
New Revision: 298249
URL: https://svnweb.freebsd.org/changeset/base/298249
Log:
Use nitems() from sys/param.h.
MFC after: 2 weeks.
Modified:
head/sbin/kldload/kldload.c
Modified: head/sbin/kldload/kldload.c
==============================================================================
--- head/sbin/kldload/kldload.c Tue Apr 19 04:52:13 2016 (r298248)
+++ head/sbin/kldload/kldload.c Tue Apr 19 04:52:51 2016 (r298249)
@@ -74,7 +74,7 @@ path_check(const char *kldname, int quie
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);
}
More information about the svn-src-head
mailing list