netlogon_creds_cli: Simplify netlogon_creds_cli_context_global
authorVolker Lendecke <vl@samba.org>
Tue, 5 Sep 2017 13:35:17 +0000 (15:35 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 25 Sep 2017 07:43:11 +0000 (09:43 +0200)
netlogon_creds_cli_open_global_db() already contains the NULL check. Use that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/auth/netlogon_creds_cli.c

index 847922c0256f2b6e58331e24d1f4eec2d47db03d..4a79b7c56e18f641c29fb8482543fbc91191f4b8 100644 (file)
@@ -434,13 +434,6 @@ NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx,
                return NT_STATUS_NO_MEMORY;
        }
 
-       if (netlogon_creds_cli_global_db != NULL) {
-               context->db.ctx = netlogon_creds_cli_global_db;
-               *_context = context;
-               TALLOC_FREE(frame);
-               return NT_STATUS_OK;
-       }
-
        status = netlogon_creds_cli_open_global_db(lp_ctx);
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(context);