Use nitems() from sys/param.h.
MFC after: 3 weeks.
This commit is contained in:
parent
5116725078
commit
56eeadd845
@ -362,8 +362,8 @@ capsicate(struct connection *conn)
|
||||
if (error != 0 && errno != ENOSYS)
|
||||
log_err(1, "cap_rights_limit");
|
||||
|
||||
error = cap_ioctls_limit(conn->conn_iscsi_fd, cmds,
|
||||
sizeof(cmds) / sizeof(cmds[0]));
|
||||
error = cap_ioctls_limit(conn->conn_iscsi_fd, cmds, nitems(cmds));
|
||||
|
||||
if (error != 0 && errno != ENOSYS)
|
||||
log_err(1, "cap_ioctls_limit");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user