From: Stefan Metzmacher Date: Fri, 12 May 2017 10:07:31 +0000 (+0200) Subject: s4:ldap_server: remove pointless (result != LDAP_SUCCESS) check X-Git-Tag: ldb-1.1.31~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3df94e62f478e43ce95923c1c48ba0fef8909142;p=thirdparty%2Fsamba.git s4:ldap_server: remove pointless (result != LDAP_SUCCESS) check We set result = LDAP_SUCCESS above and have goto do_reply; in all cases where we overwrite 'result'. Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c index 6a88891152f..7f14384f359 100644 --- a/source4/ldap_server/ldap_bind.c +++ b/source4/ldap_server/ldap_bind.c @@ -505,8 +505,7 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call) } } - if (result != LDAP_SUCCESS) { - } else if (!NT_STATUS_IS_OK(status)) { + if (!NT_STATUS_IS_OK(status)) { result = LDAP_OPERATIONS_ERROR; errstr = talloc_asprintf(reply, "SASL:[%s]: Failed to setup SASL socket: %s",