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.
This commit is contained in:
Christopher Faulet 2024-09-25 15:03:43 +02:00
parent 688abb6f30
commit 0d91de2be4
2 changed files with 9 additions and 9 deletions

View File

@ -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);

View File

@ -24,7 +24,7 @@
#include <netinet/tcp.h>
#include <netinet/in.h>
#include <haproxy/action-t.h>
#include <haproxy/action.h>
#include <haproxy/api.h>
#include <haproxy/arg.h>
#include <haproxy/channel.h>
@ -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;