diff options
author | Nathan Kinder <nkinder@redhat.com> | 2010-09-08 15:02:26 -0700 |
---|---|---|
committer | Nathan Kinder <nkinder@redhat.com> | 2010-09-09 13:40:36 -0700 |
commit | d649d3328dc2a3b6ed044966d374201a5bad6686 (patch) | |
tree | de01106aa7bfd90f6d985a786a72dd4822216572 | |
parent | 4145fd409516f6d631ad5dbbc21f3bd3e43887df (diff) | |
download | ds-d649d3328dc2a3b6ed044966d374201a5bad6686.tar.gz ds-d649d3328dc2a3b6ed044966d374201a5bad6686.tar.xz ds-d649d3328dc2a3b6ed044966d374201a5bad6686.zip |
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.
-rw-r--r-- | ldap/servers/slapd/mapping_tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |