CLEANUP: cfgparse: Remove duplication of MAX_LINE_ARGS + 1

We can calculate the number of possible arguments based off the size of the
`args` array. We should do so to prevent the two values from getting out of
sync.
This commit is contained in:
Tim Duesterhus 2021-06-06 00:50:20 +02:00 committed by Willy Tarreau
parent 5c866200d4
commit b3168b34a9

View File

@ -1961,7 +1961,7 @@ next_line:
uint32_t err;
char *errptr;
arg = MAX_LINE_ARGS + 1;
arg = sizeof(args) / sizeof(*args);
outlen = outlinesize;
err = parse_line(line, outline, &outlen, args, &arg,
PARSE_OPT_ENV | PARSE_OPT_DQUOTE | PARSE_OPT_SQUOTE |