summaryrefslogtreecommitdiff
path: root/stagit.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2018-08-19 22:03:45 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2018-08-22 18:30:00 +0200
commit175094899d7c453786857d0e5a7d2e634611aea4 (patch)
tree2449d83a4d8eb47fbc82ac195e80ad534fddc956 /stagit.c
parent1f76a28422e1081400b1c0a3319553c73620b065 (diff)
simplify range check
Diffstat (limited to 'stagit.c')
-rw-r--r--stagit.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/stagit.c b/stagit.c
index a70a222..6598ddd 100644
--- a/stagit.c
+++ b/stagit.c
@@ -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]);
}
}