From owner-svn-src-head@freebsd.org Sat Mar 11 04:01:36 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 713BCD05C21; Sat, 11 Mar 2017 04:01:36 +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 3E5471EB3; Sat, 11 Mar 2017 04:01:36 +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 v2B41ZHv021447; Sat, 11 Mar 2017 04:01:35 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2B41ZAs021446; Sat, 11 Mar 2017 04:01:35 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201703110401.v2B41ZAs021446@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:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315047 - head/usr.sbin/ctld 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:01:36 -0000 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");