Mercurial > hg > nginx
changeset 7576:7fdcf308e0f0
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.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Mon, 30 Sep 2019 16:39:20 +0300 |
parents | d34a81b49214 |
children | 5a3426683251 |
files | src/core/ngx_rbtree.c |
diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_rbtree.c Mon Sep 30 16:43:16 2019 +0300 +++ b/src/core/ngx_rbtree.c Mon Sep 30 16:39:20 2019 +0300 @@ -174,12 +174,7 @@ } 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) {