summaryrefslogtreecommitdiffstats
path: root/sys/security/audit/bsm_socket_type.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-21 19:40:10 +0000
committerpfg <pfg@FreeBSD.org>2016-04-21 19:40:10 +0000
commit42747553f484b2cfcfb919643e1749c9ad782766 (patch)
treeeafad75827e36e967c59edef51d49100cec9cad4 /sys/security/audit/bsm_socket_type.c
parentb98e219695917390f708c219fcd6bc8938cea0e2 (diff)
downloadFreeBSD-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/bsm_socket_type.c')
-rw-r--r--sys/security/audit/bsm_socket_type.c3
1 files changed, 1 insertions, 2 deletions
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)
OpenPOWER on IntegriCloud