From 6f118189230da5764d8f8dd7c234a43298b6115d Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 6 Nov 2009 20:14:41 +0100 Subject: s4:kcc - Change some counter variables to be unsigned The upper limits are unsigned variables therefore also the counter variables need to be like that. --- source4/dsdb/kcc/kcc_periodic.c | 7 ++++--- source4/dsdb/kcc/kcc_service.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c index 8d12e05178..d27e922445 100644 --- a/source4/dsdb/kcc/kcc_periodic.c +++ b/source4/dsdb/kcc/kcc_periodic.c @@ -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; ictr.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; diff --git a/source4/dsdb/kcc/kcc_service.c b/source4/dsdb/kcc/kcc_service.c index a076d20368..989b8f8c58 100644 --- a/source4/dsdb/kcc/kcc_service.c +++ b/source4/dsdb/kcc/kcc_service.c @@ -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); -- cgit