Browse Source

610281 - fix coverity Defect Type: Control flow issues

https://bugzilla.redhat.com/show_bug.cgi?id=610281

11832 DEADCODE Triaged Unassigned Bug Minor Fix Required
do_modrdn() ds/ldap/servers/slapd/modrdn.c

Comment:
At the line 201 and 212, the condition "rawnewsuperior" cannot be false.
  201    rawnewsuperior?rawnewsuperior:"",
  212    rawnewsuperior?rawnewsuperior:"",
This patch is removing the checks.
Noriko Hosoi 15 years ago
parent
commit
00b81fed60
1 changed files with 2 additions and 4 deletions
  1. 2 4
      ldap/servers/slapd/modrdn.c

+ 2 - 4
ldap/servers/slapd/modrdn.c

@@ -197,8 +197,7 @@ do_modrdn( Slapi_PBlock *pb )
 			/* check that the dn is formatted correctly */
 			err = slapi_dn_syntax_check(pb, rawnewsuperior, 1);
 			if (err) { /* syntax check failed */
-				op_shared_log_error_access(pb, "MODRDN",
-							rawnewsuperior?rawnewsuperior:"",
+				op_shared_log_error_access(pb, "MODRDN", rawnewsuperior,
 							"strict: invalid new superior");
 				send_ldap_result(pb, LDAP_INVALID_DN_SYNTAX, 
 								 NULL, "invalid new superior", 0, NULL);
@@ -208,8 +207,7 @@ do_modrdn( Slapi_PBlock *pb )
 		}
 		err = slapi_dn_normalize_ext(rawnewsuperior, 0, &newsuperior, &dnlen);
 		if (err < 0) {
-			op_shared_log_error_access(pb, "MODRDN",
-							rawnewsuperior?rawnewsuperior:"",
+			op_shared_log_error_access(pb, "MODRDN", rawnewsuperior,
 							"invalid new superior");
 			send_ldap_result(pb, LDAP_INVALID_DN_SYNTAX, 
 							 NULL, "invalid new superior", 0, NULL);