summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-12-22 12:17:23 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-12-22 12:17:23 -0800
commite8c23511578fc0c708eb50899e294da454420ac6 (patch)
tree2c2690b92b28b4e46dbc3551e735d5bf3c0b30b9
parentMerge branch 'js/windows-open-eisdir-error' into maint (diff)
parentuse labs() for variables of type long instead of abs() (diff)
downloadtgif-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 d5446d2b63..752e2e227f 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;
}