s4:kcc - Change some counter variables to be unsigned
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 6 Nov 2009 19:14:41 +0000 (20:14 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 5 Mar 2010 12:38:01 +0000 (13:38 +0100)
The upper limits are unsigned variables therefore also the counter variables
need to be like that.

source4/dsdb/kcc/kcc_periodic.c
source4/dsdb/kcc/kcc_service.c

index 8d12e05178be982cfb76ad42796f280a0a77699a..d27e922445abc2c760c5cf8bc18dc21f3078e097 100644 (file)
@@ -40,7 +40,7 @@
  */
 static bool reps_in_list(struct repsFromToBlob *r, struct repsFromToBlob *reps, uint32_t count)
 {
-       int i;
+       unsigned int i;
        for (i=0; i<count; i++) {
                if (strcmp(r->ctr.ctr1.other_info->dns_name, 
                           reps[i].ctr.ctr1.other_info->dns_name) == 0 &&
@@ -66,7 +66,7 @@ static NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service *s, TALLOC_CTX *mem_ct
                struct repsFromToBlob *old_reps;
                uint32_t old_count;
                WERROR werr;
-               int i;
+               unsigned int i;
                bool modified = false;
 
                werr = dsdb_loadreps(s->samdb, mem_ctx, p->dn, "repsFrom", &old_reps, &old_count);
@@ -119,7 +119,8 @@ static NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service *s, TALLOC_CTX *mem_ct
 NTSTATUS kccsrv_simple_update(struct kccsrv_service *s, TALLOC_CTX *mem_ctx)
 {
        struct ldb_result *res;
-       int ret, i;
+       unsigned int i;
+       int ret;
        const char *attrs[] = { "objectGUID", "invocationID", NULL };
        struct repsFromToBlob *reps = NULL;
        uint32_t count = 0;
index a076d2036853935f156cf4c22546a7ad59ce8b0d..989b8f8c5831a0d2ba9008f0041d8ab05458112b 100644 (file)
@@ -80,7 +80,7 @@ static WERROR kccsrv_load_partitions(struct kccsrv_service *s)
        struct ldb_result *r;
        struct ldb_message_element *el;
        static const char *attrs[] = { "namingContexts", "configurationNamingContext", NULL };
-       uint32_t i;
+       unsigned int i;
        int ret;
 
        basedn = ldb_dn_new(s, s->samdb, NULL);