]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
net3: Save a few lines with any_nt_status_not_ok()
authorVolker Lendecke <vl@samba.org>
Sun, 25 Jul 2021 07:46:34 +0000 (09:46 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 6 Aug 2021 17:22:30 +0000 (17:22 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/net_rpc.c

index 1306dccd5a65431ab5c6835b51a4d825d22d23ed..92603835eb281348f44f4f3350da8f7d121eb685 100644 (file)
@@ -111,18 +111,12 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
                                            LSA_POLICY_INFO_ACCOUNT_DOMAIN,
                                            &info,
                                            &result);
-       if (!NT_STATUS_IS_OK(status)) {
+       if (any_nt_status_not_ok(status, result, &status)) {
                d_fprintf(stderr, "lsaquery %s: %s\n",
                          _("failed"),
                          nt_errstr(status));
                return status;
        }
-       if (!NT_STATUS_IS_OK(result)) {
-               d_fprintf(stderr, "lsaquery %s: %s\n",
-                         _("failed"),
-                         nt_errstr(result));
-               return result;
-       }
 
        *domain_name = info->account_domain.name.string;
        *domain_sid = info->account_domain.sid;