summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/tools
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-08-09 17:27:16 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-10 09:38:20 -0700
commit700ca9fe549d520ba50debd6842a499d07308761 (patch)
treef742b8e146b7ccd7950454f93ba608ed8a349567 /ldap/servers/slapd/tools
parent9f07f9d751b23bb51792387dd264549f3dab9038 (diff)
downloadds-700ca9fe549d520ba50debd6842a499d07308761.tar.gz
ds-700ca9fe549d520ba50debd6842a499d07308761.tar.xz
ds-700ca9fe549d520ba50debd6842a499d07308761.zip
Bug 622628 - fix coverity Defect Type: Integer handling issues
https://bugzilla.redhat.com/show_bug.cgi?id=622628 Comment: This is a typo where a bitwise AND was used instead of a logical AND on line 2185. The issue is not serious, as it only affect the "number of operations" counter for ldclt. The second half of the condition is not even needed in fact, since we are guaranteed that "(ret == LDAP_ALREADY_EXISTS)" is true at line 2185. Fix Description: Based upon the comment, removing the unnecessary second half of the condition.
Diffstat (limited to 'ldap/servers/slapd/tools')
-rw-r--r--ldap/servers/slapd/tools/ldclt/ldapfct.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ldap/servers/slapd/tools/ldclt/ldapfct.c b/ldap/servers/slapd/tools/ldclt/ldapfct.c
index 19805a8c..658d71d5 100644
--- a/ldap/servers/slapd/tools/ldclt/ldapfct.c
+++ b/ldap/servers/slapd/tools/ldclt/ldapfct.c
@@ -2182,11 +2182,13 @@ createMissingNodes (
#endif /*JLS 14-11-00*/
}
else /*JLS 15-12-00*/
- if ((mctx.mode & COUNT_EACH) & (ret == LDAP_ALREADY_EXISTS))/*JLS 15-12-00*/
+ {
+ if (mctx.mode & COUNT_EACH) /*JLS 15-12-00*/
{ /*JLS 15-12-00*/
if (incrementNbOpers (tttctx) < 0) /*JLS 15-12-00*/
return (-1); /*JLS 15-12-00*/
} /*JLS 15-12-00*/
+ }
/*
* Ok, we succeed to create the entry ! or it already exist.