CLEANUP: ebtree: remove another typo, a wrong initialization in insertion 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)
This commit is contained in:
Willy Tarreau 2011-09-19 20:48:00 +02:00
parent 655c84a9f0
commit 6258f7b883
6 changed files with 9 additions and 9 deletions

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;