From: Volker Lendecke Date: Mon, 5 Aug 2024 15:22:02 +0000 (+0200) Subject: libsmb: Avoid an "else", we return in the "true" branch. X-Git-Tag: tdb-1.4.13~1374 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdabd9fff71d8e8ccdfb7ba3b66ea1ef690be10d;p=thirdparty%2Fsamba.git libsmb: Avoid an "else", we return in the "true" branch. Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider --- diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c index 3231d0bfff2..0d6a70f32a3 100644 --- a/source3/libsmb/passchange.c +++ b/source3/libsmb/passchange.c @@ -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: "