Use nitems() from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
3ae587fde4
commit
46df5db84e
@ -247,7 +247,7 @@ drop_privs(const struct hast_resource *res)
|
||||
"Unable to limit capability rights on local descriptor");
|
||||
}
|
||||
if (cap_ioctls_limit(res->hr_localfd, geomcmds,
|
||||
sizeof(geomcmds) / sizeof(geomcmds[0])) == -1) {
|
||||
nitems(geomcmds)) == -1) {
|
||||
pjdlog_errno(LOG_ERR,
|
||||
"Unable to limit allowed GEOM ioctls");
|
||||
}
|
||||
@ -266,7 +266,7 @@ drop_privs(const struct hast_resource *res)
|
||||
"Unable to limit capability rights to CAP_IOCTL on ggate descriptor");
|
||||
}
|
||||
if (cap_ioctls_limit(res->hr_ggatefd, ggatecmds,
|
||||
sizeof(ggatecmds) / sizeof(ggatecmds[0])) == -1) {
|
||||
nitems(ggatecmds)) == -1) {
|
||||
pjdlog_errno(LOG_ERR,
|
||||
"Unable to limit allowed ggate ioctls");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user