s4:sam.c - change variable types to unsigned in "sids_contains_sid"
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 4 Mar 2010 12:46:34 +0000 (13:46 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 4 Mar 2010 17:16:22 +0000 (18:16 +0100)
Should also be unsigned - no need for a signed "i" and "num_sids" here.

source4/auth/sam.c

index 3ded739f6a084972a65818b301ec859dec868544..df252c816e9defb122f484b8aac0dd2d2b368f47 100644 (file)
@@ -270,10 +270,11 @@ _PUBLIC_ NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
 }
 
 /* This function tests if a SID structure "sids" contains the SID "sid" */
-static bool sids_contains_sid(const struct dom_sid **sids, const int num_sids,
-       const struct dom_sid *sid)
+static bool sids_contains_sid(const struct dom_sid **sids,
+                             const unsigned int num_sids,
+                             const struct dom_sid *sid)
 {
-       int i;
+       unsigned int i;
 
        for (i = 0; i < num_sids; i++) {
                if (dom_sid_equal(sids[i], sid))