From 9c37575961239dc7d0d203fff341c0c7677950ba Mon Sep 17 00:00:00 2001 From: sin Date: Tue, 29 Oct 2013 15:44:25 +0000 Subject: [PATCH] A pagesize of 0 is invalid so treat it that way --- pagesize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pagesize.c b/pagesize.c index ef70628..a9d0e3b 100644 --- a/pagesize.c +++ b/pagesize.c @@ -21,9 +21,9 @@ main(int argc, char *argv[]) } ARGEND; pagesz = sysconf(_SC_PAGESIZE); - if (pagesz < 0) { + if (pagesz <= 0) { pagesz = sysconf(_SC_PAGE_SIZE); - if (pagesz < 0) + if (pagesz <= 0) enprintf(EXIT_FAILURE, "can't determine pagesize\n"); } printf("%ld\n", pagesz);