CLEANUP: actions: the keyword must always be const from the rule
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Mar 2021 10:12:38 +0000 (11:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Mar 2021 13:13:21 +0000 (14:13 +0100)
There's no reason for a rule to want to modify an action keyword, let's
make sure it is always const.

include/haproxy/action-t.h

index 7079096..91042e0 100644 (file)
@@ -111,7 +111,7 @@ struct act_rule {
                                      struct session *sess, struct stream *s, int opts);
        int (*check_ptr)(struct act_rule *rule, struct proxy *px, char **err); /* ptr to check function */
        void (*release_ptr)(struct act_rule *rule); /* ptr to release function */
-       struct action_kw *kw;
+       const struct action_kw *kw;
        struct applet applet;                  /* used for the applet registration. */
        union {
                struct {