MINOR: init: verify that there is a single word on "-cc"

This adds the exact same restriction as commit 5546c8bdc ("MINOR:
cfgparse: Fail when encountering extra arguments in macro") but for
the "-cc" command line argument, for the sake of consistency.
This commit is contained in:
Willy Tarreau 2021-07-16 16:36:05 +02:00
parent 79c52ec6b4
commit 7edc0fde05

View File

@ -1826,7 +1826,7 @@ static void init(int argc, char **argv)
exit(2);
}
if (err & PARSE_ERR_TOOMANY) {
if ((err & PARSE_ERR_TOOMANY) || *args[1]) {
ha_alert("Error in condition: Too many words.\n");
exit(2);
}