From a7d40a88c91d105dcfe2f235bc84a522bfea3de2 Mon Sep 17 00:00:00 2001 From: pfg Date: Tue, 19 Apr 2016 23:48:27 +0000 Subject: 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 --- sys/kern/sysv_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/sysv_msg.c') 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); -- cgit v1.1