From: Valentine Krasnobaeva Date: Wed, 14 Aug 2024 13:00:05 +0000 (+0200) Subject: BUG/MINOR: cfgparse-global: clean common_kw_list X-Git-Tag: v3.1-dev6~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74bc6f3d66b40b1010fe4bdfbab6d7f08199c6fa;p=thirdparty%2Fhaproxy.git BUG/MINOR: cfgparse-global: clean common_kw_list This patch fixes commits 118ac11ce ("MINOR: cfgparse-global: move mode's keywords in cfg_kw_list") and 83ff4db18 (MINOR: cfgparse-global: move no in cfg_kw_list). 'common_kw_list' serves to show the best-match keyword in cfg_parse_global(), if the given keyword was not parsed in "if..else if.." cases. cfg_parse_global() is still used as a parser for some keywords from the global section. Mode-specific and no keywords now have their own parsers. They no longer take place in the "if..else if.." from cfg_parse_global() and they are registered in the 'cfg_kws' list. So, there is no longer need to duplicate them in the 'common_kw_list'. Otherwise, they will be shown twice in parser error message. --- diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index 1fb61e63ed..7908c5d9aa 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -31,10 +31,9 @@ int cluster_secret_isset; * registered anywhere. They are used as suggestions for mistyped words. */ static const char *common_kw_list[] = { - "global", "daemon", "master-worker", "noepoll", "nokqueue", - "noevports", "nopoll", "busy-polling", "set-dumpable", + "global", "busy-polling", "set-dumpable", "insecure-fork-wanted", "insecure-setuid-wanted", "nosplice", - "nogetaddrinfo", "noreuseport", "quiet", "zero-warning", + "nogetaddrinfo", "noreuseport", "tune.runqueue-depth", "tune.maxpollevents", "tune.maxaccept", "tune.recv_enough", "tune.bufsize", "tune.maxrewrite", "tune.idletimer", "tune.rcvbuf.client", "tune.rcvbuf.server",