git-query

git data extraction tool using c and libgit2

git clone https://9o.is/git/git-query.git

commit bbf3dc3e7402e6b8c40bbdfc105d89c295161bf4
parent b753d07d8cc71f7ab2f04d749c5717ab7af49952
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 19 Aug 2018 22:03:45 +0200

simplify range check

Diffstat:
Mstagit.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git 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]); } }