diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-21 19:40:10 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-21 19:40:10 +0000 |
commit | 323b076e9c3bdccf78698ad0f1934ca8ec5438ce (patch) | |
tree | eafad75827e36e967c59edef51d49100cec9cad4 /sys/security | |
parent | 658b482e0dbe2298ff3b2fef41aa7eed8e68642c (diff) | |
download | src-323b076e9c3bdccf78698ad0f1934ca8ec5438ce.tar.gz src-323b076e9c3bdccf78698ad0f1934ca8ec5438ce.zip |
sys: use our nitems() macro when param.h is available.
This should cover all the remaining cases in the kernel.
Discussed in: freebsd-current
Notes
Notes:
svn path=/head/; revision=298431
Diffstat (limited to 'sys/security')
-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 5d27a3ac28b1..e29f11a056d8 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 94c361c36e73..afa8e6ce1a95 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) |