summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-07-02 10:47:15 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2010-07-23 13:18:44 -0700
commitde66a9e1a83ca5f9dacbfc87bf944ebaa8291058 (patch)
treed1e2806d0b6151ab134ba3d50277584647e148b9
parent782432e0ea5e795dd4fa7eb0b3c04df28d8fa072 (diff)
610281 - fix coverity Defect Type: Control flow issues
https://bugzilla.redhat.com/show_bug.cgi?id=610281 11796 DEADCODE Triaged Unassigned Bug Minor Ignore slapi_ldap_init_ext() ds/ldap/servers/slapd/ldaputil.c Comment: ldapurl is guaranteed not NULL. 323 slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext", 324 "Could not parse given LDAP URL [%s] : error [%s]\n", 325 ldapurl ? ldapurl : "NULL", 326 slapi_urlparse_err2string(rc)); 11797 DEADCODE Triaged Unassigned Bug Minor Ignore slapi_ldap_bind() ds/ldap/servers/slapd/ldaputil.c Comment: It is guaranteed that mech has some value at the line 755. 755 slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind", 756 "Error: could not perform interactive bind for id " 757 "[%s] mech [%s]: error %d (%s)\n", 758 bindid ? bindid : "(anon)", 759 mech ? mech : "SIMPLE", 760 rc, ldap_err2string(rc));
-rw-r--r--ldap/servers/slapd/ldaputil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c
index 2c5b0c9b..1ebd4793 100644
--- a/ldap/servers/slapd/ldaputil.c
+++ b/ldap/servers/slapd/ldaputil.c
@@ -322,7 +322,7 @@ slapi_ldap_init_ext(
!ludp)) {
slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
"Could not parse given LDAP URL [%s] : error [%s]\n",
- ldapurl ? ldapurl : "NULL",
+ ldapurl, /* ldapurl cannot be NULL here */
slapi_urlparse_err2string(rc));
goto done;
}
@@ -756,7 +756,7 @@ slapi_ldap_bind(
"Error: could not perform interactive bind for id "
"[%s] mech [%s]: error %d (%s)\n",
bindid ? bindid : "(anon)",
- mech ? mech : "SIMPLE",
+ mech, /* mech cannot be SIMPLE here */
rc, ldap_err2string(rc));
}
}