|
|
simplify range check - stagit-gopher - static git page generator for gopher |
|
|
 |
git clone git://git.codemadness.org/stagit-gopher (git://git.codemadness.org) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
README |
|
|
 |
LICENSE |
|
|
|
--- |
|
|
 |
commit d0d070040d949d825c4464022d0d43cb1582db1f |
|
|
 |
parent b03612ce75b2f5d2062897394375bd1f9bbf0e60 |
|
|
 |
Author: Hiltjo Posthuma <hiltjo@codemadness.org> (mailto://) |
application/vnd.lotus-organizer |
|
|
Date: Wed, 22 Aug 2018 18:26:37 +0200 |
|
|
|
|
|
|
|
simplify range check |
|
|
|
|
|
|
|
Diffstat: |
|
|
|
M stagit-gopher.c | 5 +---- |
|
|
|
|
|
|
|
1 file changed, 1 insertion(+), 4 deletions(-) |
|
|
|
--- |
|
|
 |
diff --git a/stagit-gopher.c b/stagit-gopher.c |
|
|
|
@@ -1133,10 +1133,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]); |
|
|
|
} |
|
|
|
} |
|