The branch, master has been updated via 6f11818... s4:kcc - Change some counter variables to be unsigned via 82c2448... s4:samdb_privilege.c - Change two counter variables to unsigned via c695ce7... s4:cracknames - Change two counter variables to unsigned from e878880... s4-pvfs_sys: build on systems without O_NOFOLLOW or O_DIRECTORY
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 6f118189230da5764d8f8dd7c234a43298b6115d Author: Matthias Dieter Wallnöfer <mwallnoe...@yahoo.de> Date: Fri Nov 6 20:14:41 2009 +0100 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. commit 82c2448573e9093307af42f7249d6b41fcccfb06 Author: Matthias Dieter Wallnöfer <mwallnoe...@yahoo.de> Date: Fri Nov 6 20:14:41 2009 +0100 s4:samdb_privilege.c - Change two counter variables to unsigned Also here in both cases the unsigned counter fits better than the signed one. commit c695ce729b0e92a1033d505df04cd7813cb3b1b7 Author: Matthias Dieter Wallnöfer <mwallnoe...@yahoo.de> Date: Fri Nov 6 20:14:41 2009 +0100 s4:cracknames - Change two counter variables to unsigned In both cases the unsigned counter fits better: - in the first one since we are counting LDB objects starting from 0 - in the second since we are counting an array starting from 0 ----------------------------------------------------------------------- Summary of changes: source4/dsdb/kcc/kcc_periodic.c | 7 ++++--- source4/dsdb/kcc/kcc_service.c | 2 +- source4/dsdb/samdb/cracknames.c | 4 ++-- source4/dsdb/samdb/samdb_privilege.c | 5 +++-- 4 files changed, 10 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c index 8d12e05..d27e922 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; 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; diff --git a/source4/dsdb/kcc/kcc_service.c b/source4/dsdb/kcc/kcc_service.c index a076d20..989b8f8 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); diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c index 3095ee2..9430ce0 100644 --- a/source4/dsdb/samdb/cracknames.c +++ b/source4/dsdb/samdb/cracknames.c @@ -80,7 +80,7 @@ static enum drsuapi_DsNameStatus LDB_lookup_spn_alias(krb5_context context, stru const char *alias_from, char **alias_to) { - int i; + unsigned int i; int ret; struct ldb_result *res; struct ldb_message_element *spnmappings; @@ -374,7 +374,7 @@ WERROR DsCrackNameOneName(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx, switch (format_offered) { case DRSUAPI_DS_NAME_FORMAT_UNKNOWN: { - int i; + unsigned int i; enum drsuapi_DsNameFormat formats[] = { DRSUAPI_DS_NAME_FORMAT_FQDN_1779, DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL, DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT, DRSUAPI_DS_NAME_FORMAT_CANONICAL, diff --git a/source4/dsdb/samdb/samdb_privilege.c b/source4/dsdb/samdb/samdb_privilege.c index 81b9381..ad0312d 100644 --- a/source4/dsdb/samdb/samdb_privilege.c +++ b/source4/dsdb/samdb/samdb_privilege.c @@ -47,7 +47,8 @@ static NTSTATUS samdb_privilege_setup_sid(struct ldb_context *pdb, TALLOC_CTX *m const char * const attrs[] = { "privilege", NULL }; struct ldb_message **res = NULL; struct ldb_message_element *el; - int ret, i; + unsigned int i; + int ret; char *sidstr; sidstr = ldap_encode_ndr_dom_sid(mem_ctx, sid); @@ -88,7 +89,7 @@ NTSTATUS samdb_privilege_setup(struct tevent_context *ev_ctx, { struct ldb_context *pdb; TALLOC_CTX *mem_ctx; - int i; + unsigned int i; NTSTATUS status; /* Shortcuts to prevent recursion and avoid lookups */ -- Samba Shared Repository