Use nitems() from sys/param.h.

MFC after:	3 weeks.
This commit is contained in:
Marcelo Araujo 2017-03-11 04:03:13 +00:00
parent 5116725078
commit 56eeadd845

View File

@ -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");