Use nitems() from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
dc53e146ce
commit
8ee0576c6b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298249
@ -74,7 +74,7 @@ path_check(const char *kldname, int quiet)
|
|||||||
dev = sb.st_dev;
|
dev = sb.st_dev;
|
||||||
ino = sb.st_ino;
|
ino = sb.st_ino;
|
||||||
|
|
||||||
miblen = sizeof(mib) / sizeof(mib[0]);
|
miblen = nitems(mib);
|
||||||
if (sysctlnametomib(PATHCTL, mib, &miblen) != 0) {
|
if (sysctlnametomib(PATHCTL, mib, &miblen) != 0) {
|
||||||
err(1, "sysctlnametomib(%s)", PATHCTL);
|
err(1, "sysctlnametomib(%s)", PATHCTL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user