Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Mar 2017 04:03:13 +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: r315048 - head/usr.sbin/iscsid
Message-ID:  <201703110403.v2B43E0M024506@repo.freebsd.org>

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

Log:
  Use nitems() from sys/param.h.
  
  MFC after:	3 weeks.

Modified:
  head/usr.sbin/iscsid/iscsid.c

Modified: head/usr.sbin/iscsid/iscsid.c
==============================================================================
--- head/usr.sbin/iscsid/iscsid.c	Sat Mar 11 04:01:35 2017	(r315047)
+++ head/usr.sbin/iscsid/iscsid.c	Sat Mar 11 04:03:13 2017	(r315048)
@@ -362,8 +362,8 @@ capsicate(struct connection *conn)
 	if (error != 0 && errno != ENOSYS)
 		log_err(1, "cap_rights_limit");
 
-	error = cap_ioctls_limit(conn->conn_iscsi_fd, cmds,
-	    sizeof(cmds) / sizeof(cmds[0]));
+	error = cap_ioctls_limit(conn->conn_iscsi_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?201703110403.v2B43E0M024506>