tsimplify range check - stagit - static git page generator
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit 175094899d7c453786857d0e5a7d2e634611aea4
parent 1f76a28422e1081400b1c0a3319553c73620b065
Author: Hiltjo Posthuma 
Date:   Sun, 19 Aug 2018 22:03:45 +0200

simplify range check

Diffstat:
  M stagit.c                            |       5 +----

1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/stagit.c b/stagit.c
t@@ -1042,10 +1042,7 @@ main(int argc, char *argv[])
                         errno = 0;
                         nlogcommits = strtoll(argv[++i], &p, 10);
                         if (argv[i][0] == '\0' || *p != '\0' ||
-                            nlogcommits <= 0)
-                                usage(argv[0]);
-                        if (errno == ERANGE && (nlogcommits == LLONG_MAX ||
-                            nlogcommits == LLONG_MIN))
+                            nlogcommits <= 0 || errno)
                                 usage(argv[0]);
                 }
         }