]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: Cleanup - use early return in get_dc_list().
authorJeremy Allison <jra@samba.org>
Wed, 26 Aug 2020 19:19:31 +0000 (12:19 -0700)
committerNoel Power <npower@samba.org>
Mon, 7 Sep 2020 13:23:41 +0000 (13:23 +0000)
No logic change. Makes later code changes clearer.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
source3/libsmb/namequery.c

index 06472dcffb5e88a08f5af89ea474385ef7500896..a70837db2baafa34c835ca4e643df20d87b075e7 100644 (file)
@@ -3832,9 +3832,10 @@ static NTSTATUS get_dc_list(const char *domain,
                        status = NT_STATUS_INVALID_PARAMETER;
                        goto out;
                }
-               if (NT_STATUS_IS_OK(status)) {
-                       *ret_count = (size_t)tmp_count;
+               if (!NT_STATUS_IS_OK(status)) {
+                       goto out;
                }
+               *ret_count = (size_t)tmp_count;
                goto out;
        }