summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-07-07 18:07:11 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2010-07-23 13:39:44 -0700
commitf4748c127cb3c8c9bc49322ec5104c3cd2d09d71 (patch)
treefaf2b82b1b1803e8092dd1637d61a87b1d9b6414
parent270fa7377ec1a49cf925381e1fe6b40759ec4d4e (diff)
downloadds-f4748c127cb3c8c9bc49322ec5104c3cd2d09d71.tar.gz
ds-f4748c127cb3c8c9bc49322ec5104c3cd2d09d71.tar.xz
ds-f4748c127cb3c8c9bc49322ec5104c3cd2d09d71.zip
610281 - fix coverity Defect Type: Control flow issues
https://bugzilla.redhat.com/show_bug.cgi?id=610281 11825 DEADCODE Triaged Unassigned Bug Minor Fix Required ldbm_back_modrdn() ds/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c Comment: It was checking if (parententry && parententry->ep_entry) in the if ( parententry == NULL ) clause. Removed the unnecessary code.
-rw-r--r--ldap/servers/slapd/back-ldbm/ldbm_modrdn.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
index 8c883770..dbe53e5b 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
@@ -421,14 +421,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
if(!(slapi_dn_isbesuffix(pb,slapi_sdn_get_ndn(&dn_olddn)) && isroot))
{
/* Here means that we didn't find the parent */
- if (parententry && parententry->ep_entry)
- {
- ldap_result_matcheddn = slapi_ch_strdup((char *) slapi_entry_get_dn(parententry->ep_entry));
- }
- else
- {
- ldap_result_matcheddn = "NULL";
- }
+ ldap_result_matcheddn = "NULL";
ldap_result_code= LDAP_NO_SUCH_OBJECT;
LDAPDebug( LDAP_DEBUG_TRACE, "Parent does not exist matched %s, parentdn = %s\n",
ldap_result_matcheddn, slapi_sdn_get_ndn(&dn_parentdn), 0 );