From d649d3328dc2a3b6ed044966d374201a5bad6686 Mon Sep 17 00:00:00 2001 From: Nathan Kinder Date: Wed, 8 Sep 2010 15:02:26 -0700 Subject: Bug 630094 - (cov#15454) Fix deadcode issue in mapping tree code There is no chance for next_node to be anything other than NULL in the final return statement due to the return in the "if (next_node)" block immediately before the final return. We can remove the return inside of the "if (next_node)" block since the final return statement already deals with returning the proper value if next_node is non-NULL. --- ldap/servers/slapd/mapping_tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ldap/servers/slapd/mapping_tree.c b/ldap/servers/slapd/mapping_tree.c index f8bc64d6..732dd3e7 100644 --- a/ldap/servers/slapd/mapping_tree.c +++ b/ldap/servers/slapd/mapping_tree.c @@ -3058,10 +3058,11 @@ slapi_get_next_suffix_ext(void ** node, int show_private) } while (next_node && (next_node->mtn_private && (show_private == 0))) next_node = next_node->mtn_brother; + if (next_node) { *node = next_node; - return next_node->mtn_subtree; } + return (next_node ? next_node->mtn_subtree : NULL); } -- cgit