summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-05 20:42:50 +0100
committerJunio C Hamano <gitster@pobox.com>2014-12-05 20:42:50 +0100
commit8aae35f658716fe07d4d5769e351972caffc6e23 (patch)
treede1509ba3084dbecad837933d9010dd029f45419 /config.c
parentMerge branch 'js/windows-open-eisdir-error' (diff)
parentuse labs() for variables of type long instead of abs() (diff)
downloadgit-8aae35f658716fe07d4d5769e351972caffc6e23.tar.xz
git-8aae35f658716fe07d4d5769e351972caffc6e23.zip
Merge branch 'rs/maint-config-use-labs'
* rs/maint-config-use-labs: use labs() for variables of type long instead of abs()
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.c b/config.c
index 15a2983577..ae1398f4f4 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;
}