ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit 9c37575961239dc7d0d203fff341c0c7677950ba
parent 97975ff092c1d7e4fc2d8dfec69641a236925d6e
Author: sin <sin@2f30.org>
Date:   Tue, 29 Oct 2013 15:44:25 +0000

A pagesize of 0 is invalid so treat it that way

Diffstat:
Mpagesize.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

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