simplify range check - stagit-gopher - A git gopher frontend. (mirror)
(HTM) git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
(DIR) LICENSE
---
(DIR) commit d0d070040d949d825c4464022d0d43cb1582db1f
(DIR) parent b03612ce75b2f5d2062897394375bd1f9bbf0e60
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
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(-)
---
(DIR) 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]);
}
}