1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-28 12:59:41 +01:00

Merge branch 'rs/maint-config-use-labs' into maint

* rs/maint-config-use-labs:
  use labs() for variables of type long instead of abs()
This commit is contained in:
Junio C Hamano 2014-12-22 12:17:23 -08:00
commit e8c2351157

View file

@ -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;
}