simplify range check
This commit is contained in:
parent
1f76a28422
commit
175094899d
1 changed files with 1 additions and 4 deletions
5
stagit.c
5
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]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue