Kaynağa Gözat

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.
Nathan Kinder 15 yıl önce
ebeveyn
işleme
d649d3328d
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      ldap/servers/slapd/mapping_tree.c

+ 2 - 1
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);
 }