From: Willy Tarreau Date: Thu, 8 Oct 2026 17:03:58 +0000 (+0200) Subject: CLEANUP: cfgparse: remove the unused common_kw_list[] definitions X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=df8c1bd152ad10564fee5260b467589c89c752d5;p=haproxy.git CLEANUP: cfgparse: remove the unused common_kw_list[] definitions These were the old (and incomplete) lists of section names for use with cfg_parse_global() and cfg_parse_listen(), that were passed to cfg_find_best_match(). They're no longer needed so let's get rid of them. --- diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index 09167daa0..6d5dc02fc 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -32,17 +32,6 @@ int cluster_secret_isset; -/* some keywords that are still being parsed using strcmp() and are not - * registered anywhere. They are used as suggestions for mistyped words. - * DO NOT ADD ANY NEW KEYWORDS HERE, THAT MUST NO LONGER BE NECESSARY! - */ -static const char *common_kw_list[] = { - "global", - "defaults", "listen", "frontend", "backend", - "peers", "resolvers", - NULL /* must be last */ -}; - /* * parse a line in a section. Returns the error code, 0 if OK, or * any combination of : diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c index 23f931d7b..ca1b13cc0 100644 --- a/src/cfgparse-listen.c +++ b/src/cfgparse-listen.c @@ -36,15 +36,6 @@ #include #include -/* some keywords that are still being parsed using strcmp() and are not - * registered anywhere. They are used as suggestions for mistyped words. - * DO NOT ADD ANY NEW KEYWORDS HERE, THAT MUST NO LONGER BE NECESSARY! - */ -static const char *common_kw_list[] = { - "listen", "frontend", "backend", "defaults", - NULL /* must be last */ -}; - /* Options which are not described in the cfg_opts* arrays because they need a * dedicated parsing, and which are only used as suggestions for mistyped * words. This list must be kept in sync with the options which have a