diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-10 12:03:51 -0700 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-11 10:40:08 -0700 |
commit | 4322579ea437f5d4be927d905bdb0312135d743f (patch) | |
tree | b64e6f2154206cbda433f10887e2399bf5171893 /ldap/servers/plugins/acl | |
parent | 62ff35794d6888b9eaaca37313b03e2062d1bc93 (diff) | |
download | ds-4322579ea437f5d4be927d905bdb0312135d743f.tar.gz ds-4322579ea437f5d4be927d905bdb0312135d743f.tar.xz ds-4322579ea437f5d4be927d905bdb0312135d743f.zip |
Bug 622903 - fix coverity Defect Type: Code maintainability issues
https://bugzilla.redhat.com/show_bug.cgi?id=622903
Comment:
The "word" assignment on line 961 and 963 is unnecessary because
the value will be overwritten.
Comment:
The "s" assignments on line 271, 280, and 281 are unnecessary
because the value is never used.
Diffstat (limited to 'ldap/servers/plugins/acl')
-rw-r--r-- | ldap/servers/plugins/acl/aclparse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ldap/servers/plugins/acl/aclparse.c b/ldap/servers/plugins/acl/aclparse.c index 8c88bf4a..fb7e5c0d 100644 --- a/ldap/servers/plugins/acl/aclparse.c +++ b/ldap/servers/plugins/acl/aclparse.c @@ -268,7 +268,7 @@ __aclp__parse_aci (char *str, aci_t *aci_item) type = ACI_TARGET_FILTER; /* we need to remove the targetfilter stuff*/ - if ( (s = strstr( str, "!=" )) != NULL ) { + if ( strstr( str, "!=" ) != NULL ) { type |= ACI_TARGET_FILTER_NOT; } @@ -277,8 +277,8 @@ __aclp__parse_aci (char *str, aci_t *aci_item) * have a target and it must have a macro. */ - if ((s = strstr (str, ACL_RULE_MACRO_DN_KEY)) != NULL || - ((s = strstr(str, ACL_RULE_MACRO_DN_LEVELS_KEY)) != NULL)) { + if ((strstr(str, ACL_RULE_MACRO_DN_KEY) != NULL) || + (strstr(str, ACL_RULE_MACRO_DN_LEVELS_KEY) != NULL)) { /* Must have a targetmacro */ if ( !(aci_item->aci_type & ACI_TARGET_MACRO_DN)) { @@ -958,16 +958,16 @@ __aclp__getNextLASRule (aci_t *aci_item, char *original_str , char **endOfCurrRu if ( (strncasecmp(newstr, "allow", 5) == 0) || (strncasecmp(newstr, "deny", 4) == 0) ) { - word = ldap_utf8strtok_r(newstr, ")", &next); + ldap_utf8strtok_r(newstr, ")", &next); } else { - word = ldap_utf8strtok_r(newstr, " ", &next); + ldap_utf8strtok_r(newstr, " ", &next); } /* * The first word is of no interest -- skip it * it's allow or deny followed by the rights (<rights>), * so skip over the rights as well or it's 'and', 'or',.... - */ + */ while ( (word = ldap_utf8strtok_r(NULL, " ", &next)) != NULL) { int got_rule = 0; |