- commit
- 175094899d7c453786857d0e5a7d2e634611aea4
- parent
- 1f76a28422e1081400b1c0a3319553c73620b065
- Author
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date
- 2018-08-19 20:03
simplify range check
Diffstat
M | stagit.c | 5 | +---- |
1 files changed, 1 insertions, 4 deletions
diff --git a/stagit.c b/stagit.c
@@ -1042,10 +1042,7 @@ main(int argc, char *argv[]) 1042 1042 errno = 0; 1043 1043 nlogcommits = strtoll(argv[++i], &p, 10); 1044 1044 if (argv[i][0] == '\0' || *p != '\0' ||1045 -1 nlogcommits <= 0)1046 -1 usage(argv[0]);1047 -1 if (errno == ERANGE && (nlogcommits == LLONG_MAX ||1048 -1 nlogcommits == LLONG_MIN))-1 1045 nlogcommits <= 0 || errno) 1049 1046 usage(argv[0]); 1050 1047 } 1051 1048 }