diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-21 19:40:10 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-21 19:40:10 +0000 |
commit | 42747553f484b2cfcfb919643e1749c9ad782766 (patch) | |
tree | eafad75827e36e967c59edef51d49100cec9cad4 /sys/security/audit | |
parent | b98e219695917390f708c219fcd6bc8938cea0e2 (diff) | |
download | FreeBSD-src-42747553f484b2cfcfb919643e1749c9ad782766.zip FreeBSD-src-42747553f484b2cfcfb919643e1749c9ad782766.tar.gz |
sys: use our nitems() macro when param.h is available.
This should cover all the remaining cases in the kernel.
Discussed in: freebsd-current
Diffstat (limited to 'sys/security/audit')
-rw-r--r-- | sys/security/audit/bsm_fcntl.c | 3 | ||||
-rw-r--r-- | sys/security/audit/bsm_socket_type.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/security/audit/bsm_fcntl.c b/sys/security/audit/bsm_fcntl.c index 5d27a3a..e29f11a 100644 --- a/sys/security/audit/bsm_fcntl.c +++ b/sys/security/audit/bsm_fcntl.c @@ -237,8 +237,7 @@ static const bsm_fcntl_cmd_t bsm_fcntl_cmdtab[] = { { BSM_F_FS_SPECIFIC_15, FCNTL_FS_SPECIFIC_BASE + 15}, #endif /* FCNTL_FS_SPECIFIC_BASE */ }; -static const int bsm_fcntl_cmd_count = sizeof(bsm_fcntl_cmdtab) / - sizeof(bsm_fcntl_cmdtab[0]); +static const int bsm_fcntl_cmd_count = nitems(bsm_fcntl_cmdtab); static const bsm_fcntl_cmd_t * bsm_lookup_local_fcntl_cmd(int local_fcntl_cmd) diff --git a/sys/security/audit/bsm_socket_type.c b/sys/security/audit/bsm_socket_type.c index 94c361c..afa8e6c 100644 --- a/sys/security/audit/bsm_socket_type.c +++ b/sys/security/audit/bsm_socket_type.c @@ -52,8 +52,7 @@ static const struct bsm_socket_type bsm_socket_types[] = { { BSM_SOCK_RDM, SOCK_RDM }, { BSM_SOCK_SEQPACKET, SOCK_SEQPACKET }, }; -static const int bsm_socket_types_count = sizeof(bsm_socket_types) / - sizeof(bsm_socket_types[0]); +static const int bsm_socket_types_count = nitems(bsm_socket_types); static const struct bsm_socket_type * bsm_lookup_local_socket_type(int local_socket_type) |