diff options
author | Vladimir Homutov <vl@nginx.com> | 2019-09-30 16:39:20 +0300 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2019-09-30 16:39:20 +0300 |
commit | f7999fe6893fec58332357c12eeb02f39589b894 (patch) | |
tree | c9d391ab82e365b8a2014d1a295bf2b76c4e1730 /src/core/ngx_rbtree.c | |
parent | 201062c83f1d053b36fe376d3837da5f1feb451b (diff) |
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.
Diffstat (limited to 'src/core/ngx_rbtree.c')
-rw-r--r-- | src/core/ngx_rbtree.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/core/ngx_rbtree.c b/src/core/ngx_rbtree.c index 969d549c8..377b82fcc 100644 --- a/src/core/ngx_rbtree.c +++ b/src/core/ngx_rbtree.c @@ -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) { |