s4:ldap_server: remove pointless (result != LDAP_SUCCESS) check
authorStefan Metzmacher <metze@samba.org>
Fri, 12 May 2017 10:07:31 +0000 (12:07 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 15 Jun 2017 07:13:24 +0000 (09:13 +0200)
We set result = LDAP_SUCCESS above and have goto do_reply;
in all cases where we overwrite 'result'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/ldap_server/ldap_bind.c

index 6a88891152fcea2c792e8af6737147bf186c301b..7f14384f3595fa1892b72b2f050a1c883ba5ad8c 100644 (file)
@@ -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",