Skip to content

Commit

Permalink
CLEANUP: ebtree: remove another typo, a wrong initialization in inser…
Browse files Browse the repository at this point in the history
…tion code

(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)
(cherry picked from commit 6258f7b883ba3b9dd15a71d17cb8323301283a47)
  • Loading branch information
wtarreau committed Dec 22, 2011
1 parent 0bf7372 commit 7bc7594
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ebtree/eb32tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions ebtree/eb64tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ebtree/ebimtree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ebtree/ebistree.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,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;
Expand Down
4 changes: 2 additions & 2 deletions ebtree/ebmbtree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ebtree/ebsttree.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,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;
Expand Down

0 comments on commit 7bc7594

Please sign in to comment.