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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "[email protected]"