]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: server: use eb64_entry() not ebmb_entry() to convert an eb64
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Sep 2025 13:49:48 +0000 (15:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Sep 2025 07:23:46 +0000 (09:23 +0200)
There were a few leftovers from an earlier version of the conn_hash_node
that was using ebmb nodes. A few calls to ebmb_first() and ebmb_entry()
were still present while acting on an eb64 tree. These are harmless as
one is just eb_first() and the other container_of(), but it's confusing
so let's clean them up.

src/server.c

index 8457573fedab42664326a53ff0e21a16c97f6fda..8cbda7ef89cb3f13dddb432d70d1f0509c6c97fc 100644 (file)
@@ -17,7 +17,7 @@
 #include <errno.h>
 
 #include <import/cebis_tree.h>
-#include <import/ebmbtree.h>
+#include <import/eb64tree.h>
 
 #include <haproxy/api.h>
 #include <haproxy/applet-t.h>
@@ -7278,7 +7278,7 @@ struct connection *srv_lookup_conn(struct eb_root *tree, uint64_t hash)
 
        node = eb64_lookup(tree, hash);
        if (node) {
-               hash_node = ebmb_entry(node, struct conn_hash_node, node);
+               hash_node = eb64_entry(node, struct conn_hash_node, node);
                conn = hash_node->conn;
        }
 
@@ -7518,8 +7518,8 @@ static void srv_close_idle_conns(struct server *srv)
 
                for (cleaned_tree = conn_trees; *cleaned_tree; ++cleaned_tree) {
                        while (!eb_is_empty(*cleaned_tree)) {
-                               struct ebmb_node *node = ebmb_first(*cleaned_tree);
-                               struct conn_hash_node *conn_hash_node = ebmb_entry(node, struct conn_hash_node, node);
+                               struct eb64_node *node = eb64_first(*cleaned_tree);
+                               struct conn_hash_node *conn_hash_node = eb64_entry(node, struct conn_hash_node, node);
                                struct connection *conn = conn_hash_node->conn;
 
                                if (conn->ctrl->ctrl_close)