From: Volker Lendecke Date: Wed, 1 Jul 2026 15:05:54 +0000 (+0200) Subject: auth3: Reduce indentation with an early return X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0723c0b9ef1b7b93e6922406c5810e3bc82199e;p=thirdparty%2Fsamba.git auth3: Reduce indentation with an early return Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/auth/auth.c b/source3/auth/auth.c index a00df8d7ab1..7d51731d96c 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -454,17 +454,17 @@ static bool load_auth_module( } } - if (entry != NULL) { - if (!NT_STATUS_IS_OK(entry->init(auth_context, module_params, ret))) { - DBG_ERR("auth method %s did not correctly init\n", - module_name); - } else { - DBG_INFO("auth method %s has a valid init\n", - module_name); - good = True; - } - } else { + if (entry == NULL) { DBG_ERR("can't find auth method %s!\n", module_name); + return false; + } + + if (!NT_STATUS_IS_OK(entry->init(auth_context, module_params, ret))) { + DBG_ERR("auth method %s did not correctly init\n", + module_name); + } else { + DBG_INFO("auth method %s has a valid init\n", module_name); + good = True; } return good;