Date: Fri, 22 Apr 2016 21:26:15 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r298488 - stable/10/lib/libc/gen Message-ID: <201604222126.u3MLQFNV082110@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Fri Apr 22 21:26:15 2016 New Revision: 298488 URL: https://svnweb.freebsd.org/changeset/base/298488 Log: MFC r298303: Remove trailing whitespace and use `nitems(mib)` instead of `2` when calling sysctl(3) Modified: stable/10/lib/libc/gen/getpagesize.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/getpagesize.c ============================================================================== --- stable/10/lib/libc/gen/getpagesize.c Fri Apr 22 20:31:29 2016 (r298487) +++ stable/10/lib/libc/gen/getpagesize.c Fri Apr 22 21:26:15 2016 (r298488) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604222126.u3MLQFNV082110>