From 6258f7b883ba3b9dd15a71d17cb8323301283a47 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 19 Sep 2011 20:48:00 +0200 Subject: CLEANUP: ebtree: remove another typo, a wrong initialization in insertion code (from ebtree 6.0.7) root_right was wrongly initialized first to 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 | 4 ++-- ebtree/eb64tree.h | 4 ++-- ebtree/ebimtree.h | 2 +- ebtree/ebistree.h | 2 +- ebtree/ebmbtree.h | 4 ++-- ebtree/ebsttree.h | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ebtree/eb32tree.h b/ebtree/eb32tree.h index 83d2c53..f36f09a 100644 --- a/ebtree/eb32tree.h +++ b/ebtree/eb32tree.h @@ -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; diff --git a/ebtree/eb64tree.h b/ebtree/eb64tree.h index e5825f0..b97e0c4 100644 --- a/ebtree/eb64tree.h +++ b/ebtree/eb64tree.h @@ -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; diff --git a/ebtree/ebimtree.h b/ebtree/ebimtree.h index 685e940..b40e490 100644 --- a/ebtree/ebimtree.h +++ b/ebtree/ebimtree.h @@ -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; diff --git a/ebtree/ebistree.h b/ebtree/ebistree.h index ded5cb1..cfa0de0 100644 --- a/ebtree/ebistree.h +++ b/ebtree/ebistree.h @@ -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; diff --git a/ebtree/ebmbtree.h b/ebtree/ebmbtree.h index 8d1e4e5..121c59f 100644 --- a/ebtree/ebmbtree.h +++ b/ebtree/ebmbtree.h @@ -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; diff --git a/ebtree/ebsttree.h b/ebtree/ebsttree.h index fefade5..511fb7a 100644 --- a/ebtree/ebsttree.h +++ b/ebtree/ebsttree.h @@ -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; -- 1.7.2.3