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:
Vladimir Homutov 2019-09-30 16:39:20 +03:00
parent 27fc42b3a3
commit f3f0c4e76e
1 changed files with 1 additions and 6 deletions

View File

@ -174,12 +174,7 @@ ngx_rbtree_delete(ngx_rbtree_t *tree, ngx_rbtree_node_t *node)
} else {
subst = ngx_rbtree_min(node->right, sentinel);
if (subst->left != sentinel) {
temp = subst->left;
} else {
temp = subst->right;
}
temp = subst->right;
}
if (subst == *root) {