From 3270e71a994f341cabeca992b68aa2e9bf932bf3 Mon Sep 17 00:00:00 2001 From: mycroft Date: Sun, 18 Sep 1994 04:32:35 +0000 Subject: [PATCH] Stylistic changes. --- lib/libc/gen/getpagesize.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/libc/gen/getpagesize.c b/lib/libc/gen/getpagesize.c index bf6222f2e4f5..c8b986e16193 100644 --- a/lib/libc/gen/getpagesize.c +++ b/lib/libc/gen/getpagesize.c @@ -42,15 +42,15 @@ int getpagesize() { static int pagsz; - int mib[2], value; + int mib[2]; size_t size; - if (pagsz != 0) - return pagsz; - mib[0] = CTL_HW; - mib[1] = HW_PAGESIZE; - size = sizeof value; - if (sysctl(mib, 2, &value, &size, NULL, 0) == -1) - return (-1); - return (pagsz = value); + if (pagsz == 0) { + mib[0] = CTL_HW; + mib[1] = HW_PAGESIZE; + size = sizeof value; + if (sysctl(mib, 2, &pagsz, &size, NULL, 0) == -1) + return (-1); + } + return (pagsz); }