]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: ebtree: remove another typo, a wrong initialization in insertion code
authorWilly Tarreau <w@1wt.eu>
Mon, 19 Sep 2011 18:48:00 +0000 (20:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Dec 2011 16:09:50 +0000 (17:09 +0100)
(from ebtree 6.0.7)

root_right was wrongly initialized first to <root> which is not the same
type, to be later initialized to root->b[EB_RGHT].

Let's simply remove the wrong and useless initialization.
(cherry picked from commit e63a0c2f56369b52c4d00221d83c2c4569605c06)

ebtree/eb32tree.h
ebtree/eb64tree.h
ebtree/ebimtree.h
ebtree/ebistree.h
ebtree/ebmbtree.h
ebtree/ebsttree.h

index 83d2c5311380cf211043521fa996ec6bf36f88c8..f36f09a024f3fd1b114ba8a80eac4fbfdc5ed56b 100644 (file)
@@ -229,7 +229,7 @@ __eb32_insert(struct eb_root *root, struct eb32_node *new) {
        unsigned int side;
        eb_troot_t *troot, **up_ptr;
        u32 newkey; /* caching the key saves approximately one cycle */
-       eb_troot_t *root_right = root;
+       eb_troot_t *root_right;
        eb_troot_t *new_left, *new_rght;
        eb_troot_t *new_leaf;
        int old_node_bit;
@@ -361,7 +361,7 @@ __eb32i_insert(struct eb_root *root, struct eb32_node *new) {
        unsigned int side;
        eb_troot_t *troot, **up_ptr;
        int newkey; /* caching the key saves approximately one cycle */
-       eb_troot_t *root_right = root;
+       eb_troot_t *root_right;
        eb_troot_t *new_left, *new_rght;
        eb_troot_t *new_leaf;
        int old_node_bit;
index e5825f01e4427eafe2a0cc28791bec32bec894f0..b97e0c41e6e1571c581e968c303e99f6331b9b1e 100644 (file)
@@ -225,7 +225,7 @@ __eb64_insert(struct eb_root *root, struct eb64_node *new) {
        unsigned int side;
        eb_troot_t *troot;
        u64 newkey; /* caching the key saves approximately one cycle */
-       eb_troot_t *root_right = root;
+       eb_troot_t *root_right;
        int old_node_bit;
 
        side = EB_LEFT;
@@ -401,7 +401,7 @@ __eb64i_insert(struct eb_root *root, struct eb64_node *new) {
        unsigned int side;
        eb_troot_t *troot;
        u64 newkey; /* caching the key saves approximately one cycle */
-       eb_troot_t *root_right = root;
+       eb_troot_t *root_right;
        int old_node_bit;
 
        side = EB_LEFT;
index 685e9402bdd8f0dc3ec83d4f738ae3af606bfd46..b40e490b4ea453cf5fee7578416a7627d943c316 100644 (file)
@@ -136,7 +136,7 @@ __ebim_insert(struct eb_root *root, struct ebpt_node *new, unsigned int len)
        struct ebpt_node *old;
        unsigned int side;
        eb_troot_t *troot;
-       eb_troot_t *root_right = root;
+       eb_troot_t *root_right;
        int diff;
        int bit;
        int old_node_bit;
index ded5cb13e611eaf3aa6e936ab149d83142ef98e9..cfa0de03ce83b39b8a3d8c020ecc4301b644c3f8 100644 (file)
@@ -131,7 +131,7 @@ __ebis_insert(struct eb_root *root, struct ebpt_node *new)
        struct ebpt_node *old;
        unsigned int side;
        eb_troot_t *troot;
-       eb_troot_t *root_right = root;
+       eb_troot_t *root_right;
        int diff;
        int bit;
        int old_node_bit;
index 8d1e4e5afe6a99868844c2c77f663fea3c57aa77..121c59fa12ed1e61bd83f5f482dc9d572e7d1c7b 100644 (file)
@@ -216,7 +216,7 @@ __ebmb_insert(struct eb_root *root, struct ebmb_node *new, unsigned int len)
        struct ebmb_node *old;
        unsigned int side;
        eb_troot_t *troot, **up_ptr;
-       eb_troot_t *root_right = root;
+       eb_troot_t *root_right;
        int diff;
        int bit;
        eb_troot_t *new_left, *new_rght;
@@ -554,7 +554,7 @@ __ebmb_insert_prefix(struct eb_root *root, struct ebmb_node *new, unsigned int l
        struct ebmb_node *old;
        unsigned int side;
        eb_troot_t *troot, **up_ptr;
-       eb_troot_t *root_right = root;
+       eb_troot_t *root_right;
        int diff;
        int bit;
        eb_troot_t *new_left, *new_rght;
index fefade50ccf65daed3209fa3ba17b0e56151a437..511fb7af7bc419ebc26b9cb13251a69f0d2417a4 100644 (file)
@@ -128,7 +128,7 @@ __ebst_insert(struct eb_root *root, struct ebmb_node *new)
        struct ebmb_node *old;
        unsigned int side;
        eb_troot_t *troot;
-       eb_troot_t *root_right = root;
+       eb_troot_t *root_right;
        int diff;
        int bit;
        int old_node_bit;