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

View file

@ -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) {