diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-10 17:05:26 -0700 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-11 15:52:13 -0700 |
commit | 3ec3639a80d4381459bc696649f8c30de32fcbc9 (patch) | |
tree | 614a9b0d35ded69b68de208cb82eaaf173db026d /ldap/servers/slapd/back-ldbm | |
parent | 6aa107ecf25e33524f5d39c3cd58654ebf6fd5e5 (diff) | |
download | ds-3ec3639a80d4381459bc696649f8c30de32fcbc9.tar.gz ds-3ec3639a80d4381459bc696649f8c30de32fcbc9.tar.xz ds-3ec3639a80d4381459bc696649f8c30de32fcbc9.zip |
Bug 622903 - fix coverity Defect Type: Code maintainability issues
https://bugzilla.redhat.com/show_bug.cgi?id=622903
Comment:
The "p" assignments on line 260, 264, and 268 can be removed
because they are not needed.
Diffstat (limited to 'ldap/servers/slapd/back-ldbm')
-rw-r--r-- | ldap/servers/slapd/back-ldbm/ldbm_attr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_attr.c b/ldap/servers/slapd/back-ldbm/ldbm_attr.c index a73a5320..e67c0745 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_attr.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_attr.c @@ -183,7 +183,6 @@ attr_index_config( char **index_rules = NULL; struct attrinfo *a; int return_value = -1; - char *p; int *substrlens = NULL; attrs = slapi_str2charray( argv[0], "," ); @@ -272,15 +271,15 @@ attr_index_config( Slapi_PBlock* pb = NULL; int do_continue = 0; /* can we skip the RULE parsing stuff? */ - if ((p = strstr(index_rules[j], INDEX_ATTR_SUBSTRBEGIN))) { + if (strstr(index_rules[j], INDEX_ATTR_SUBSTRBEGIN)) { _set_attr_substrlen(INDEX_SUBSTRBEGIN, index_rules[j], &substrlens); do_continue = 1; /* done with j - next j */ - } else if ((p = strstr(index_rules[j], INDEX_ATTR_SUBSTRMIDDLE))) { + } else if (strstr(index_rules[j], INDEX_ATTR_SUBSTRMIDDLE)) { _set_attr_substrlen(INDEX_SUBSTRMIDDLE, index_rules[j], &substrlens); do_continue = 1; /* done with j - next j */ - } else if ((p = strstr(index_rules[j], INDEX_ATTR_SUBSTREND))) { + } else if (strstr(index_rules[j], INDEX_ATTR_SUBSTREND)) { _set_attr_substrlen(INDEX_SUBSTREND, index_rules[j], &substrlens); do_continue = 1; /* done with j - next j */ |