From owner-svn-src-head@freebsd.org Sat Mar 11 04:03:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C31BD05E58; Sat, 11 Mar 2017 04:03:15 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED597178; Sat, 11 Mar 2017 04:03:14 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2B43EXq024507; Sat, 11 Mar 2017 04:03:14 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2B43E0M024506; Sat, 11 Mar 2017 04:03:14 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201703110403.v2B43E0M024506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sat, 11 Mar 2017 04:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315048 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Mar 2017 04:03:15 -0000 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");