summaryrefslogtreecommitdiff
path: root/source3/lib/tldap.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2012-12-17 14:21:01 +0100
committerGünther Deschner <gd@samba.org>2012-12-21 13:56:00 +0100
commit7f8c8d80ef6553dc28f0bf6d9aa7a2c46ab55529 (patch)
treeb1de7b66a4facd65728f344792d393ad3b28f958 /source3/lib/tldap.c
parent7937a6afcbe38af271894364a44abd55207ba83b (diff)
downloadsamba-7f8c8d80ef6553dc28f0bf6d9aa7a2c46ab55529.tar.gz
samba-7f8c8d80ef6553dc28f0bf6d9aa7a2c46ab55529.tar.bz2
samba-7f8c8d80ef6553dc28f0bf6d9aa7a2c46ab55529.zip
s3-tldap: Fix dead code in tldap_sasl_bind_send().
dn can't be NULL cause it is set to "" in that case. Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/lib/tldap.c')
-rw-r--r--source3/lib/tldap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c
index 8b04d00636..765580fd81 100644
--- a/source3/lib/tldap.c
+++ b/source3/lib/tldap.c
@@ -817,7 +817,7 @@ struct tevent_req *tldap_sasl_bind_send(TALLOC_CTX *mem_ctx,
asn1_push_tag(state->out, TLDAP_REQ_BIND);
asn1_write_Integer(state->out, ld->ld_version);
- asn1_write_OctetString(state->out, dn, (dn != NULL) ? strlen(dn) : 0);
+ asn1_write_OctetString(state->out, dn, strlen(dn));
if (mechanism == NULL) {
asn1_push_tag(state->out, ASN1_CONTEXT_SIMPLE(0));