diff options
author | Aurelien DARRAGON <adarragon@haproxy.com> | 2023-05-11 14:13:07 +0200 |
---|---|---|
committer | Christopher Faulet <cfaulet@haproxy.com> | 2023-05-11 15:37:04 +0200 |
commit | 31b23aef383aa787ca05464302e07e304621e689 (patch) | |
tree | c9458ff229a639ba6fe7e376e969eed995d63f65 | |
parent | c61009525809a3ef78eb71050b81815786d2f0d9 (diff) | |
download | haproxy-31b23aef383aa787ca05464302e07e304621e689.tar.gz |
CLEANUP: acl: discard prune_acl_cond() function
Thanks to previous commit, we have no more use for prune_acl_cond(),
let's remove it to prevent code duplication.
-rw-r--r-- | include/haproxy/acl.h | 3 | ||||
-rw-r--r-- | src/acl.c | 15 |
2 files changed, 0 insertions, 18 deletions
diff --git a/include/haproxy/acl.h b/include/haproxy/acl.h index 07a23153d..38b173985 100644 --- a/include/haproxy/acl.h +++ b/include/haproxy/acl.h @@ -74,9 +74,6 @@ struct acl *prune_acl(struct acl *acl); */ struct acl *parse_acl(const char **args, struct list *known_acl, char **err, struct arg_list *al, const char *file, int line); -/* Purge everything in the acl_cond <cond>, then return <cond>. */ -struct acl_cond *prune_acl_cond(struct acl_cond *cond); - /* Parse an ACL condition starting at <args>[0], relying on a list of already * known ACLs passed in <known_acl>. The new condition is returned (or NULL in * case of low memory). Supports multiple conditions separated by "or". @@ -843,21 +843,6 @@ static struct acl *find_acl_default(const char *acl_name, struct list *known_acl return NULL; } -/* Purge everything in the acl_cond <cond>, then return <cond>. */ -struct acl_cond *prune_acl_cond(struct acl_cond *cond) -{ - struct acl_term_suite *suite, *tmp_suite; - struct acl_term *term, *tmp_term; - - /* iterate through all term suites and free all terms and all suites */ - list_for_each_entry_safe(suite, tmp_suite, &cond->suites, list) { - list_for_each_entry_safe(term, tmp_term, &suite->terms, list) - free(term); - free(suite); - } - return cond; -} - /* Parse an ACL condition starting at <args>[0], relying on a list of already * known ACLs passed in <known_acl>. The new condition is returned (or NULL in * case of low memory). Supports multiple conditions separated by "or". If |