BUG/MINOR: config: emit warning for empty args only in discovery mode

Hide warning about empty argument outside of discovery mode. This is
necessary, else the message will be displayed twice, which hampers
haproxy output lisibility.

This should fix github isue #2995.

This should be backported up to 3.2.
This commit is contained in:
Amaury Denoyelle 2025-06-04 11:26:27 +02:00
parent f5d41803d3
commit 5f1fad1690

View File

@ -2066,6 +2066,8 @@ next_line:
goto next_line;
}
if ((global.mode & MODE_DISCOVERY)) {
/* Only print empty arg warning in discovery mode to prevent double display. */
for (check_arg = 0; check_arg < arg; check_arg++) {
if (!*args[check_arg]) {
size_t newpos;
@ -2090,6 +2092,7 @@ next_line:
break;
}
}
}
/* everything's OK */
break;