mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 13:51:26 +02:00
BUG/MINOR: tcpheck: the source list must be a const in dup_tcpcheck_var()
This is just an API bug but it's annoying when trying to tidy the code. The source list passed in argument must be a const and not a variable, as it's typically the list head from a default proxy and must obviously not be modified by the function. No backport is needed as it only impacts new code.
This commit is contained in:
parent
016255a483
commit
09f2e77eb1
@ -47,7 +47,7 @@ void deinit_proxy_tcpcheck(struct proxy *px);
|
||||
|
||||
struct tcpcheck_var *create_tcpcheck_var(const struct ist name);
|
||||
void free_tcpcheck_var(struct tcpcheck_var *var);
|
||||
int dup_tcpcheck_vars(struct list *dst, struct list *src);
|
||||
int dup_tcpcheck_vars(struct list *dst, const struct list *src);
|
||||
void free_tcpcheck_vars(struct list *vars);
|
||||
|
||||
int add_tcpcheck_expect_str(struct tcpcheck_rules *rules, const char *str);
|
||||
|
@ -254,9 +254,10 @@ void free_tcpcheck_vars(struct list *vars)
|
||||
}
|
||||
|
||||
/* Duplicate a list of preset tcp-check variables */
|
||||
int dup_tcpcheck_vars(struct list *dst, struct list *src)
|
||||
int dup_tcpcheck_vars(struct list *dst, const struct list *src)
|
||||
{
|
||||
struct tcpcheck_var *var, *new = NULL;
|
||||
const struct tcpcheck_var *var;
|
||||
struct tcpcheck_var *new = NULL;
|
||||
|
||||
list_for_each_entry(var, src, list) {
|
||||
new = create_tcpcheck_var(var->name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user