aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-22 12:17:23 -0800
committerJunio C Hamano <gitster@pobox.com>2014-12-22 12:17:23 -0800
commite8c23511578fc0c708eb50899e294da454420ac6 (patch)
tree2c2690b92b28b4e46dbc3551e735d5bf3c0b30b9
parent8390d5cda9a4da982837bac1822d9ab3cf3f7ad9 (diff)
parent83915ba5219955e8c0b747ec413afe4f78bea289 (diff)
downloadgit-e8c23511578fc0c708eb50899e294da454420ac6.tar.gz
git-e8c23511578fc0c708eb50899e294da454420ac6.tar.xz
Merge branch 'rs/maint-config-use-labs' into maint
* rs/maint-config-use-labs: use labs() for variables of type long instead of abs()
-rw-r--r--config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.c b/config.c
index d5446d2b6..752e2e227 100644
--- a/config.c
+++ b/config.c
@@ -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;
}