]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: winbindd: reduce scope of a variable
authorShaleen Bathla <shaleen.bathla@oracle.com>
Wed, 21 Feb 2024 13:08:45 +0000 (18:38 +0530)
committerNoel Power <npower@samba.org>
Thu, 22 Feb 2024 09:47:44 +0000 (09:47 +0000)
reduce scope of variable as a best practice

Signed-off-by: Shaleen Bathla <shaleen.bathla@oracle.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
source3/winbindd/winbindd_rpc.c

index 2b4a47e223dac30ddbed5510bfcb7a0038b0b9f1..ef015b2fbf251f74a1d9bd9b25c89daab0473beb 100644 (file)
@@ -323,7 +323,6 @@ NTSTATUS rpc_lookup_useraliases(TALLOC_CTX *mem_ctx,
                                uint32_t **palias_rids)
 {
 #define MAX_SAM_ENTRIES_W2K 0x400 /* 1024 */
-       uint32_t num_query_sids = 0;
        uint32_t num_queries = 1;
        uint32_t num_aliases = 0;
        uint32_t total_sids = 0;
@@ -337,6 +336,7 @@ NTSTATUS rpc_lookup_useraliases(TALLOC_CTX *mem_ctx,
        do {
                /* prepare query */
                struct lsa_SidArray sid_array;
+               uint32_t num_query_sids = 0;
 
                ZERO_STRUCT(sid_array);