mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
BUILD: config: remove a warning with clang
Commit fc6c032 ("MEDIUM: global: add support for CPU binding on Linux ("cpu-map")") merged into 1.5-dev13 involves a useless test that clang reports as a warning. The "low" variable cannot be negative here. Issue reported by Charles Carter.
This commit is contained in:
parent
86e0fc1739
commit
7c29f1edca
@ -1405,7 +1405,7 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm)
|
|||||||
high = swap;
|
high = swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (low < 0 || high >= sizeof(long) * 8) {
|
if (high >= sizeof(long) * 8) {
|
||||||
Alert("parsing [%s:%d]: %s supports CPU numbers from 0 to %d.\n",
|
Alert("parsing [%s:%d]: %s supports CPU numbers from 0 to %d.\n",
|
||||||
file, linenum, args[0], (int)(sizeof(long) * 8 - 1));
|
file, linenum, args[0], (int)(sizeof(long) * 8 - 1));
|
||||||
err_code |= ERR_ALERT | ERR_FATAL;
|
err_code |= ERR_ALERT | ERR_FATAL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user