diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/getpagesize.c | 4 | ||||
-rw-r--r-- | lib/libc/stdlib/lsearch.3 | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/gen/getpagesize.c b/lib/libc/gen/getpagesize.c index f4b8128..62178eb 100644 --- a/lib/libc/gen/getpagesize.c +++ b/lib/libc/gen/getpagesize.c @@ -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); diff --git a/lib/libc/stdlib/lsearch.3 b/lib/libc/stdlib/lsearch.3 index 2a1a731..f2f0105 100644 --- a/lib/libc/stdlib/lsearch.3 +++ b/lib/libc/stdlib/lsearch.3 @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 21, 2013 +.Dd April 17, 2016 .Dt LSEARCH 3 .Os .Sh NAME @@ -107,7 +107,7 @@ main(int argc, char **argv) printf("Enter a number: "); if (scanf("%d", &key) != 1) { - printf("Bad input\n"); + printf("Bad input\en"); return (EXIT_FAILURE); } @@ -115,9 +115,9 @@ main(int argc, char **argv) element_compare); if (element != NULL) - printf("Element found: %d\n", *(int *)element); + printf("Element found: %d\en", *(int *)element); else - printf("Element not found\n"); + printf("Element not found\en"); return (EXIT_SUCCESS); } |