From 8ee0576c6b9c672dc2f6bef218392e22326467de Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Tue, 19 Apr 2016 04:52:51 +0000 Subject: [PATCH] Use nitems() from sys/param.h. MFC after: 2 weeks. --- sbin/kldload/kldload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/kldload/kldload.c b/sbin/kldload/kldload.c index 3891f3328942..fd75647ec4cf 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); }