From 0d91de2be4cf23e817c4891bfee3fc8d66389136 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 25 Sep 2024 15:03:43 +0200 Subject: [PATCH] MINOR: action: Export release_expr_int_action() release function This function was only used by TCP actions and was private to tcp_act.c file. However, it make sense to make it public to be used by any action relying on an int-or-expression argument. --- include/haproxy/action.h | 8 ++++++++ src/tcp_act.c | 10 +--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/haproxy/action.h b/include/haproxy/action.h index dba1408b9..3841df990 100644 --- a/include/haproxy/action.h +++ b/include/haproxy/action.h @@ -117,6 +117,14 @@ static inline void release_timeout_action(struct act_rule *rule) release_sample_expr(rule->arg.timeout.expr); } +/* + * Release expr_int rule argument when action is no longer used + */ +static inline void release_expr_int_action(struct act_rule *rule) +{ + release_sample_expr(rule->arg.expr_int.expr); +} + struct act_rule *new_act_rule(enum act_from from, const char *file, int linenum); void free_act_rules(struct list *rules); void dump_act_rules(const struct list *rules, const char *pfx); diff --git a/src/tcp_act.c b/src/tcp_act.c index c9c4a5c32..c8f5ca286 100644 --- a/src/tcp_act.c +++ b/src/tcp_act.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include @@ -484,14 +484,6 @@ static void release_set_src_dst_action(struct act_rule *rule) release_sample_expr(rule->arg.expr); } -/* - * Release expr_int rule argument when action is no longer used - */ -static __maybe_unused void release_expr_int_action(struct act_rule *rule) -{ - release_sample_expr(rule->arg.expr_int.expr); -} - static int tcp_check_attach_srv(struct act_rule *rule, struct proxy *px, char **err) { struct proxy *be = NULL;