]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: http_rules: do not declare http_*_keywords_registre() inline
authorWilly Tarreau <w@1wt.eu>
Wed, 2 Mar 2022 13:50:38 +0000 (14:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 2 Mar 2022 13:50:38 +0000 (14:50 +0100)
The 3 functions http_{req,res,after_res}_keywords_register() are
referenced in initcalls by their pointer, it makes no sense to declare
them inline. At best it causes function duplication, at worst it doesn't
build on older compilers.

include/haproxy/http_rules.h
src/http_rules.c

index 060e3e80fb11c0006258ea1ceb6ed2919d5e3ba6..1820bbd8d570434d3c5ce86f289db2a3c53c0c44 100644 (file)
@@ -37,20 +37,9 @@ struct act_rule *parse_http_after_res_cond(const char **args, const char *file,
 struct redirect_rule *http_parse_redirect_rule(const char *file, int linenum, struct proxy *curproxy,
                                                const char **args, char **errmsg, int use_fmt, int dir);
 
-static inline void http_req_keywords_register(struct action_kw_list *kw_list)
-{
-       LIST_APPEND(&http_req_keywords.list, &kw_list->list);
-}
-
-static inline void http_res_keywords_register(struct action_kw_list *kw_list)
-{
-       LIST_APPEND(&http_res_keywords.list, &kw_list->list);
-}
-
-static inline void http_after_res_keywords_register(struct action_kw_list *kw_list)
-{
-       LIST_APPEND(&http_after_res_keywords.list, &kw_list->list);
-}
+void http_req_keywords_register(struct action_kw_list *kw_list);
+void http_res_keywords_register(struct action_kw_list *kw_list);
+void http_after_res_keywords_register(struct action_kw_list *kw_list);
 
 struct action_kw *action_http_req_custom(const char *kw);
 struct action_kw *action_http_res_custom(const char *kw);
index 0d6e1659128c8dc82de11c7bd1558bef7a160316..2ed9dfc70d00587517a9b27efa14b9b6ceb32396 100644 (file)
@@ -50,6 +50,21 @@ struct action_kw_list http_after_res_keywords = {
        .list = LIST_HEAD_INIT(http_after_res_keywords.list)
 };
 
+void http_req_keywords_register(struct action_kw_list *kw_list)
+{
+       LIST_APPEND(&http_req_keywords.list, &kw_list->list);
+}
+
+void http_res_keywords_register(struct action_kw_list *kw_list)
+{
+       LIST_APPEND(&http_res_keywords.list, &kw_list->list);
+}
+
+void http_after_res_keywords_register(struct action_kw_list *kw_list)
+{
+       LIST_APPEND(&http_after_res_keywords.list, &kw_list->list);
+}
+
 /*
  * Return the struct http_req_action_kw associated to a keyword.
  */