[hackers] [ubase] A pagesize of 0 is invalid so treat it that way || sin

From: <git_AT_suckless.org>
Date: Tue, 29 Oct 2013 16:45:17 +0100

commit 9c37575961239dc7d0d203fff341c0c7677950ba
Author: sin <sin_AT_2f30.org>
Date: Tue Oct 29 15:44:25 2013 +0000

    A pagesize of 0 is invalid so treat it that way

diff --git a/pagesize.c b/pagesize.c
index ef70628..a9d0e3b 100644
--- a/pagesize.c
+++ b/pagesize.c
_AT_@ -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
");
         }
         printf("%ld
", pagesz);
Received on Tue Oct 29 2013 - 16:45:17 CET

This archive was generated by hypermail 2.3.0 : Tue Oct 29 2013 - 16:48:23 CET