Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Mar 2017 04:01:35 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315047 - head/usr.sbin/ctld
Message-ID:  <201703110401.v2B41ZAs021446@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Sat Mar 11 04:01:35 2017
New Revision: 315047
URL: https://svnweb.freebsd.org/changeset/base/315047

Log:
  Use nitems() from sys/param.h.
  
  Reviewed by:	np
  MFC after:	3 weeks.
  Differential Revision:	https://reviews.freebsd.org/D9945

Modified:
  head/usr.sbin/ctld/kernel.c

Modified: head/usr.sbin/ctld/kernel.c
==============================================================================
--- head/usr.sbin/ctld/kernel.c	Sat Mar 11 04:00:27 2017	(r315046)
+++ head/usr.sbin/ctld/kernel.c	Sat Mar 11 04:01:35 2017	(r315047)
@@ -1285,8 +1285,8 @@ kernel_capsicate(void)
 	if (error != 0 && errno != ENOSYS)
 		log_err(1, "cap_rights_limit");
 
-	error = cap_ioctls_limit(ctl_fd, cmds,
-	    sizeof(cmds) / sizeof(cmds[0]));
+	error = cap_ioctls_limit(ctl_fd, cmds, nitems(cmds));
+
 	if (error != 0 && errno != ENOSYS)
 		log_err(1, "cap_ioctls_limit");
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703110401.v2B41ZAs021446>