]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: action: Export release_expr_int_action() release function
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 25 Sep 2024 13:03:43 +0000 (15:03 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 30 Sep 2024 14:55:53 +0000 (16:55 +0200)
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
src/tcp_act.c

index dba1408b95f53ff9bf915a53a00c78a9d24a2bba..3841df9908d5b4cfadda9efffd65bcfd07e644c0 100644 (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);
index c9c4a5c32d3134aee31c50286a0afb236d1e1f2d..c8f5ca2863367cd5652905abfcdb3d7f30894c8b 100644 (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;