svn commit: r298488 - stable/10/lib/libc/gen

Garrett Cooper ngie at FreeBSD.org
Fri Apr 22 21:26:16 UTC 2016


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);


More information about the svn-src-stable mailing list