]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Avoid an "else", we return in the "true" branch.
authorVolker Lendecke <vl@samba.org>
Mon, 5 Aug 2024 15:22:02 +0000 (17:22 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 20 Aug 2024 09:34:39 +0000 (09:34 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libsmb/passchange.c

index 3231d0bfff2d5a7e01ce1969cd13eafea42650d1..0d6a70f32a3c9a50ab11e3789010dea621b64726 100644 (file)
@@ -250,9 +250,11 @@ NTSTATUS remote_password_change(const char *remote_machine,
                /* Great - it all worked! */
                cli_shutdown(cli);
                return NT_STATUS_OK;
+       }
 
-       } else if (!(NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED)
-                    || NT_STATUS_EQUAL(result, NT_STATUS_UNSUCCESSFUL))) {
+       if (!(NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED) ||
+             NT_STATUS_EQUAL(result, NT_STATUS_UNSUCCESSFUL)))
+       {
                /* it failed, but for reasons such as wrong password, too short etc ... */
 
                if (asprintf(err_str, "machine %s rejected the password change: "