1
0
Эх сурвалжийг харах

Bug 622903 - fix coverity Defect Type: Code maintainability issues

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

Comment:
The call to strchr() is unnecessary because strcpy() will ensure
that string p is NULL-terminated.
Noriko Hosoi 15 жил өмнө
parent
commit
62ff35794d

+ 0 - 2
ldap/servers/plugins/acl/aclutil.c

@@ -389,7 +389,6 @@ aclutil__typestr (int type , char str[])
 	}
 	}
 	if (type & ACI_HAS_DENY_RULE) {
 	if (type & ACI_HAS_DENY_RULE) {
 		strcpy (p, "deny_rule ");
 		strcpy (p, "deny_rule ");
-		p = strchr (p, '\0');	
 	}
 	}
 }
 }
 static void 
 static void 
@@ -453,7 +452,6 @@ aclutil__Ruletypestr (int type , char str[])
 	}
 	}
 	if ( type & ACI_SSF_RULE) {
 	if ( type & ACI_SSF_RULE) {
 		strcpy (p, "ssf ");
 		strcpy (p, "ssf ");
-		p = strchr (p, '\0');
 	}
 	}
 }
 }
 /*
 /*