]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
auth3: Reduce indentation with an early return
authorVolker Lendecke <vl@samba.org>
Wed, 1 Jul 2026 15:05:54 +0000 (17:05 +0200)
committerAnoop C S <anoopcs@samba.org>
Fri, 3 Jul 2026 04:47:29 +0000 (04:47 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/auth/auth.c

index a00df8d7ab1da9cd9b56e60352124789767c982c..7d51731d96cdc1ccf3eb59cdd475dfd47437fef2 100644 (file)
@@ -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;