[master] 15431a544 vcc_acl: an RBT insert includes a find operation
Nils Goroll
nils.goroll at uplex.de
Fri Mar 26 14:23:04 UTC 2021
commit 15431a544f97dda1c512a7b52bfba72e9865a787
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Fri Mar 26 15:21:39 2021 +0100
vcc_acl: an RBT insert includes a find operation
diff --git a/lib/libvcc/vcc_acl.c b/lib/libvcc/vcc_acl.c
index ed0042a67..6d0cd6b25 100644
--- a/lib/libvcc/vcc_acl.c
+++ b/lib/libvcc/vcc_acl.c
@@ -95,7 +95,6 @@ vcl_acl_cmp(const struct acl_e *ae1, const struct acl_e *ae2)
}
VRBT_GENERATE_INSERT_COLOR(acl_tree, acl_e, branch, static)
-VRBT_GENERATE_FIND(acl_tree, acl_e, branch, vcl_acl_cmp, static)
VRBT_GENERATE_INSERT(acl_tree, acl_e, branch, vcl_acl_cmp, static)
VRBT_GENERATE_MINMAX(acl_tree, acl_e, branch, static)
VRBT_GENERATE_NEXT(acl_tree, acl_e, branch, static)
@@ -160,7 +159,7 @@ vcc_acl_insert_entry(struct vcc *tl, struct acl_e *aen)
{
struct acl_e *ae2;
- ae2 = VRBT_FIND(acl_tree, &tl->acl_tree, aen);
+ ae2 = VRBT_INSERT(acl_tree, &tl->acl_tree, aen);
if (ae2 != NULL) {
if (ae2->not != aen->not) {
VSB_cat(tl->sb, "Conflicting ACL entries:\n");
@@ -171,7 +170,6 @@ vcc_acl_insert_entry(struct vcc *tl, struct acl_e *aen)
free(aen);
return;
}
- VRBT_INSERT(acl_tree, &tl->acl_tree, aen);
}
static void
More information about the varnish-commit
mailing list