From owner-svn-src-stable-9@freebsd.org Fri Apr 22 21:28:51 2016 Return-Path: Delivered-To: svn-src-stable-9@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 3D16FB1857F; Fri, 22 Apr 2016 21:28:51 +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 0EEEC11F3; Fri, 22 Apr 2016 21:28:50 +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 u3MLSoNI082276; Fri, 22 Apr 2016 21:28:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3MLSoGM082275; Fri, 22 Apr 2016 21:28:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201604222128.u3MLSoGM082275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 22 Apr 2016 21:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r298489 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2016 21:28:51 -0000 Author: ngie Date: Fri Apr 22 21:28:50 2016 New Revision: 298489 URL: https://svnweb.freebsd.org/changeset/base/298489 Log: MFstable/10 r298488: MFC r298303: Remove trailing whitespace and use `nitems(mib)` instead of `2` when calling sysctl(3) Modified: stable/9/lib/libc/gen/getpagesize.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/getpagesize.c ============================================================================== --- stable/9/lib/libc/gen/getpagesize.c Fri Apr 22 21:26:15 2016 (r298488) +++ stable/9/lib/libc/gen/getpagesize.c Fri Apr 22 21:28:50 2016 (r298489) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); int getpagesize() { - int mib[2]; + int mib[2]; static int value; size_t size; int error; @@ -68,7 +68,7 @@ getpagesize() mib[0] = CTL_HW; mib[1] = HW_PAGESIZE; size = sizeof value; - if (sysctl(mib, 2, &value, &size, NULL, 0) == -1) + if (sysctl(mib, nitems(mib), &value, &size, NULL, 0) == -1) return (-1); return (value);