From owner-svn-src-head@freebsd.org Mon Nov 2 00:42:32 2015 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 7CAB1A237D9; Mon, 2 Nov 2015 00:42:32 +0000 (UTC) (envelope-from ngie@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 470401D55; Mon, 2 Nov 2015 00:42:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA20gVP7089880; Mon, 2 Nov 2015 00:42:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA20gVfx089879; Mon, 2 Nov 2015 00:42:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020042.tA20gVfx089879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 00:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290251 - head/tools/regression/security/open_to_operation 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.20 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: Mon, 02 Nov 2015 00:42:32 -0000 Author: ngie Date: Mon Nov 2 00:42:31 2015 New Revision: 290251 URL: https://svnweb.freebsd.org/changeset/base/290251 Log: Use nitems(x) instead of sizeof(x)/sizeof(x[0]) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/security/open_to_operation/open_to_operation.c Modified: head/tools/regression/security/open_to_operation/open_to_operation.c ============================================================================== --- head/tools/regression/security/open_to_operation/open_to_operation.c Mon Nov 2 00:39:28 2015 (r290250) +++ head/tools/regression/security/open_to_operation/open_to_operation.c Mon Nov 2 00:42:31 2015 (r290251) @@ -119,10 +119,10 @@ __FBSDID("$FreeBSD$"); */ static const int file_modes[] = { O_RDONLY, O_WRONLY, O_RDWR, O_RDONLY | O_TRUNC, O_WRONLY | O_TRUNC, O_RDWR | O_TRUNC }; -static const int file_modes_count = sizeof(file_modes) / sizeof(int); +static const int file_modes_count = nitems(file_modes); static const int dir_modes[] = { O_RDONLY }; -static const int dir_modes_count = sizeof(dir_modes) / sizeof(int); +static const int dir_modes_count = nitems(dir_modes); static int testnum; static int aio_present;