summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-08-10 13:21:53 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-11 15:51:32 -0700
commitdea74463ed8d688e7ee19f576d39c8deb9bf8e23 (patch)
treee5f55e4b4e4ae4fd3b535e2c39a0e9386b33b25c
parentae1b507266e49ebc2d5bc472b8fc017b2c492b79 (diff)
Bug 622903 - fix coverity Defect Type: Code maintainability issues
https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The "ptr" assignment on line 2622 is unnecessary because the value is never used. The "word" assignment on line 2630 can be removed because the first token is ignored. Alternatively the value should be validated. The "ptr" assignment on line 1456 is unnecessary because the value is not used. The "word" assignment on line 1463 can be removed because the first token is ignored. Alternatively the value should be validated. The "ptr" assignment on line 1210 is unnecessary because the value is never used. The "word" assignment on line 1217 can be removed because the first token is ignored. Alternatively the value should be validated.
-rw-r--r--ldap/servers/plugins/acl/acllas.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ldap/servers/plugins/acl/acllas.c b/ldap/servers/plugins/acl/acllas.c
index 5de18661..1d6f6dcd 100644
--- a/ldap/servers/plugins/acl/acllas.c
+++ b/ldap/servers/plugins/acl/acllas.c
@@ -1207,14 +1207,14 @@ DS_LASUserDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
/* See if we have a parent[2].attr" rule */
- if ( (ptr = strstr(attrName, "parent[")) != NULL) {
+ if (strstr(attrName, "parent[") != NULL) {
char *word, *str, *next;
numOflevels = 0;
n_currEntryDn = slapi_entry_get_ndn ( lasinfo.resourceEntry );
str = attrName;
- word = ldap_utf8strtok_r(str, "[],. ",&next);
+ ldap_utf8strtok_r(str, "[],. ",&next);
/* The first word is "parent[" and so it's not important */
while ((word= ldap_utf8strtok_r(NULL, "[],.", &next)) != NULL) {
@@ -1453,14 +1453,14 @@ DS_LASLdapUrlAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
}
/* See if we have a parent[2].attr" rule */
- if ( (ptr = strstr(attrName, "parent[")) != NULL) {
+ if (strstr(attrName, "parent[") != NULL) {
char *word, *str, *next;
numOflevels = 0;
n_currEntryDn = slapi_entry_get_ndn ( lasinfo.resourceEntry );
str = attrName;
- word = ldap_utf8strtok_r(str, "[],. ",&next);
+ ldap_utf8strtok_r(str, "[],. ",&next);
/* The first word is "parent[" and so it's not important */
while ((word= ldap_utf8strtok_r(NULL, "[],.", &next)) != NULL) {
@@ -2619,7 +2619,7 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
slapi_log_error( SLAPI_LOG_ACL, plugin_name,"Attr:%s\n" , attrName);
/* See if we have a parent[2].attr" rule */
- if ( (ptr = strstr(attrName, "parent[")) != NULL) {
+ if (strstr(attrName, "parent[") != NULL) {
char *word, *str, *next;
numOflevels = 0;
@@ -2627,7 +2627,7 @@ DS_LASGroupDnAttrEval(NSErr_t *errp, char *attr_name, CmpOp_t comparator,
s_attrName = attrName = slapi_ch_strdup ( attr_pattern );
str = attrName;
- word = ldap_utf8strtok_r(str, "[],. ",&next);
+ ldap_utf8strtok_r(str, "[],. ",&next);
/* The first word is "parent[" and so it's not important */
while ((word= ldap_utf8strtok_r(NULL, "[],.", &next)) != NULL) {