Merge branch 'rs/maint-config-use-labs'
* rs/maint-config-use-labs: use labs() for variables of type long instead of abs()
This commit is contained in:
commit
8aae35f658
4
config.c
4
config.c
@ -506,9 +506,9 @@ static int git_parse_signed(const char *value, intmax_t *ret, intmax_t max)
|
|||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
uval = abs(val);
|
uval = labs(val);
|
||||||
uval *= factor;
|
uval *= factor;
|
||||||
if (uval > max || abs(val) > uval) {
|
if (uval > max || labs(val) > uval) {
|
||||||
errno = ERANGE;
|
errno = ERANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user