MINOR: pattern: remerge the list and tree deletion functions

pat_del_tree_gen() was already chained onto pat_del_list_gen() to deal
with remaining cases, so let's complete the merge and have a generic
pattern deletion function acting on the reference and taking care of
reliably removing all elements.
This commit is contained in:
Willy Tarreau
2020-11-02 19:53:16 +01:00
parent 78777ead32
commit f1c0892aa6
3 changed files with 36 additions and 44 deletions

View File

@@ -78,12 +78,11 @@ int pat_idx_tree_pfx(struct pattern_expr *expr, struct pattern *pat, char **err)
/*
*
* The following functions deletes all patterns related to reference pattern
* The following function deletes all patterns related to reference pattern
* element <elt> in pattern refernce <ref>.
*
*/
void pat_del_list_gen(struct pat_ref *ref, struct pat_ref_elt *elt);
void pat_del_tree_gen(struct pat_ref *ref, struct pat_ref_elt *elt);
void pat_delete_gen(struct pat_ref *ref, struct pat_ref_elt *elt);
/*
*