stagit-gopher

static git page generator for gopher (mirror)
git clone git://git.2f30.org/stagit-gopher.git
Log | Files | Refs | README | LICENSE

commit d0d070040d949d825c4464022d0d43cb1582db1f
parent b03612ce75b2f5d2062897394375bd1f9bbf0e60
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Wed, 22 Aug 2018 18:26:37 +0200

simplify range check

Diffstat:
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]); } }