Skip to content

Commit

Permalink
Merge branch 'rs/maint-config-use-labs' into maint
Browse files Browse the repository at this point in the history
* rs/maint-config-use-labs:
  use labs() for variables of type long instead of abs()
  • Loading branch information
Junio C Hamano committed Dec 22, 2014
2 parents 8390d5c + 83915ba commit e8c2351
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 @@ -506,9 +506,9 @@ static int git_parse_signed(const char *value, intmax_t *ret, intmax_t max)
errno = EINVAL;
return 0;
}
uval = abs(val);
uval = labs(val);
uval *= factor;
if (uval > max || abs(val) > uval) {
if (uval > max || labs(val) > uval) {
errno = ERANGE;
return 0;
}
Expand Down

0 comments on commit e8c2351

Please sign in to comment.