summaryrefslogtreecommitdiffstats
path: root/sys/kern/sysv_msg.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-19 23:48:27 +0000
committerpfg <pfg@FreeBSD.org>2016-04-19 23:48:27 +0000
commita7d40a88c91d105dcfe2f235bc84a522bfea3de2 (patch)
treede102c840aded1a3b5511745802f9d6ef74aeb6f /sys/kern/sysv_msg.c
parent99e9a53c8161ee4ae550ad18b73edd303a3724f4 (diff)
downloadFreeBSD-src-a7d40a88c91d105dcfe2f235bc84a522bfea3de2.zip
FreeBSD-src-a7d40a88c91d105dcfe2f235bc84a522bfea3de2.tar.gz
kernel: use our nitems() macro when it is available through param.h.
No functional change, only trivial cases are done in this sweep, Discussed in: freebsd-current
Diffstat (limited to 'sys/kern/sysv_msg.c')
-rw-r--r--sys/kern/sysv_msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index 59357c4..22845bb 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -1519,7 +1519,7 @@ sys_msgsys(td, uap)
if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC))
return (ENOSYS);
if (uap->which < 0 ||
- uap->which >= sizeof(msgcalls)/sizeof(msgcalls[0]))
+ uap->which >= nitems(msgcalls))
return (EINVAL);
error = (*msgcalls[uap->which])(td, &uap->a2);
return (error);
OpenPOWER on IntegriCloud