Core: removed dead code in ngx_rbtree_delete().
The result of ngx_rbtree_min() is always a node with the left child equal to sentinel, thus the check is unnecessary.
This commit is contained in:
parent
27fc42b3a3
commit
f3f0c4e76e
1 changed files with 1 additions and 6 deletions
|
@ -174,12 +174,7 @@ ngx_rbtree_delete(ngx_rbtree_t *tree, ngx_rbtree_node_t *node)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
subst = ngx_rbtree_min(node->right, sentinel);
|
subst = ngx_rbtree_min(node->right, sentinel);
|
||||||
|
temp = subst->right;
|
||||||
if (subst->left != sentinel) {
|
|
||||||
temp = subst->left;
|
|
||||||
} else {
|
|
||||||
temp = subst->right;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subst == *root) {
|
if (subst == *root) {
|
||||||
|
|
Loading…
Reference in a new issue