Skip to content

Commit

Permalink
Merge pull request #2258 from dscho/gcc-9-gfw
Browse files Browse the repository at this point in the history
Support compiling with GCC v9.x
  • Loading branch information
dscho authored Jul 11, 2019
2 parents fcf334e + a034042 commit 271c090
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,9 +869,9 @@ static int git_parse_signed(const char *value, intmax_t *ret, intmax_t max)
errno = EINVAL;
return 0;
}
uval = labs(val);
uval = val < 0 ? -val : val;
uval *= factor;
if (uval > max || labs(val) > uval) {
if (uval > max || (val < 0 ? -val : val) > uval) {
errno = ERANGE;
return 0;
}
Expand Down

0 comments on commit 271c090

Please sign in to comment.