[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Sun Mar 7 12:18:16 MST 2010


The branch, master has been updated
       via  6997185... s4:ranged_results LDB module - change counter variables to "unsigned" where appropriate
       via  a973d9e... s4:objectguid LDB module - change counter variables to "unsigned" where appropriate
       via  cd43dd0... s4:objectclass LDB module - change counter variabls to "unsigned" where appropriate
       via  2932df5... s4:anr LDB module - change counter variable to "unsigned"
       via  77e1497... s4:acl LDB module - change counter variable to "unsigned"
       via  f9f7199... s4:linked_attributes LDB module - change counter variables to "unsigned" where appropriate
       via  049f9d3... s4:kludge_acl LDB module - change counter variables to "unsigned" where appropriate
       via  4ad912d... s4:proxy LDB module - Change counter variables to "unsigned" where appropriate
       via  90e2365... s4:schema_data LDB module - change counter variables to "unsigned" where appropriate
       via  ad7dd1c... s4:resolve_oids LDB module - change counter variables to "unsigned" where appropriate
       via  b85b9b3... s4:rootdse LDB module - change counter variables to "unsigned" where appropriate
       via  d1dd0a5... s4:partition LDB module - change counter variables to "unsigned" where appropriate
      from  5a54b20... s4:schema - Change also here counters to "unsigned" where needed

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6997185e36a0f497e78ff18481ee3a1a0a9aa059
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:18:39 2010 +0100

    s4:ranged_results LDB module - change counter variables to "unsigned" where appropriate

commit a973d9eedb2e2db78b5985984f5f04ace4daf4da
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:18:02 2010 +0100

    s4:objectguid LDB module - change counter variables to "unsigned" where appropriate

commit cd43dd04af47e210dbab13826642c2434a1f2053
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:17:28 2010 +0100

    s4:objectclass LDB module - change counter variabls to "unsigned" where appropriate

commit 2932df57ae77da81bf007996013ed29b170caef5
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:16:55 2010 +0100

    s4:anr LDB module - change counter variable to "unsigned"

commit 77e1497a7b466569d5c733fc929d4e663a766fef
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:16:24 2010 +0100

    s4:acl LDB module - change counter variable to "unsigned"

commit f9f7199250486aebf4829f708b5f934d097c3245
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:15:37 2010 +0100

    s4:linked_attributes LDB module - change counter variables to "unsigned" where appropriate

commit 049f9d3c1a62f00b5f6eae97cfebddd45bf2edbc
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:14:16 2010 +0100

    s4:kludge_acl LDB module - change counter variables to "unsigned" where appropriate

commit 4ad912d2daed57b08f75b59638aa940109d8f167
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:13:11 2010 +0100

    s4:proxy LDB module - Change counter variables to "unsigned" where appropriate
    
    Use "size_t" when counting string index positions.

commit 90e236544f60c847e3fc7e3c183f9759850d3575
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:12:30 2010 +0100

    s4:schema_data LDB module - change counter variables to "unsigned" where appropriate

commit ad7dd1cf71a80f707a01af9874777ba88d79dcd8
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:11:48 2010 +0100

    s4:resolve_oids LDB module - change counter variables to "unsigned" where appropriate

commit b85b9b364faca9c3c3aef467f3825b3055de9622
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:11:03 2010 +0100

    s4:rootdse LDB module - change counter variables to "unsigned" where appropriate

commit d1dd0a560cb6a847f9fdd47b3a4d2ff9d8c09f2b
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Mar 7 19:10:00 2010 +0100

    s4:partition LDB module - change counter variables to "unsigned" where appropriate

-----------------------------------------------------------------------

Summary of changes:
 source4/dsdb/samdb/ldb_modules/acl.c               |    2 +-
 source4/dsdb/samdb/ldb_modules/anr.c               |    2 +-
 source4/dsdb/samdb/ldb_modules/kludge_acl.c        |   15 ++++++++----
 source4/dsdb/samdb/ldb_modules/linked_attributes.c |    8 ++++--
 source4/dsdb/samdb/ldb_modules/objectclass.c       |    4 +-
 source4/dsdb/samdb/ldb_modules/objectguid.c        |    2 +-
 source4/dsdb/samdb/ldb_modules/partition.c         |   24 +++++++++++--------
 source4/dsdb/samdb/ldb_modules/partition_init.c    |   19 ++++++++++-----
 source4/dsdb/samdb/ldb_modules/proxy.c             |   11 +++++----
 source4/dsdb/samdb/ldb_modules/ranged_results.c    |    4 +-
 source4/dsdb/samdb/ldb_modules/resolve_oids.c      |   10 ++++----
 source4/dsdb/samdb/ldb_modules/rootdse.c           |   19 ++++++++-------
 source4/dsdb/samdb/ldb_modules/schema_data.c       |    9 +++++--
 13 files changed, 75 insertions(+), 54 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
index 250d626..c10624d 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -752,7 +752,7 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
 	int ret;
 	struct ldb_context *ldb = ldb_module_get_ctx(module);
 	const struct dsdb_schema *schema = dsdb_get_schema(ldb);
-	int i;
+	unsigned int i;
 	bool modify_sd = false;
 	const struct GUID *guid;
 	uint32_t access_granted;
diff --git a/source4/dsdb/samdb/ldb_modules/anr.c b/source4/dsdb/samdb/ldb_modules/anr.c
index a5220b3..dbd0838 100644
--- a/source4/dsdb/samdb/ldb_modules/anr.c
+++ b/source4/dsdb/samdb/ldb_modules/anr.c
@@ -239,7 +239,7 @@ static int anr_replace_subtrees(struct anr_context *ac,
 				struct ldb_parse_tree **ntree)
 {
 	int ret;
-	int i;
+	unsigned int i;
 
 	switch (tree->operation) {
 	case LDB_OP_AND:
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
index cc29d26..3bdcaff 100644
--- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c
+++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
@@ -97,7 +97,8 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess
 	const struct dsdb_schema *schema = dsdb_get_schema(ldb);
 	TALLOC_CTX *mem_ctx;
 	const char **attr_list;
-	int i, ret;
+	unsigned int i;
+	int ret;
 
  	/* If we don't have a schema yet, we can't do anything... */
 	if (schema == NULL) {
@@ -144,7 +145,8 @@ static int kludge_acl_childClasses(struct ldb_context *ldb, struct ldb_message *
 	struct ldb_message_element *allowedClasses;
 	const struct dsdb_schema *schema = dsdb_get_schema(ldb);
 	const struct dsdb_class *sclass;
-	int i, j, ret;
+	unsigned int i, j;
+	int ret;
 
  	/* If we don't have a schema yet, we can't do anything... */
 	if (schema == NULL) {
@@ -199,7 +201,8 @@ static int kludge_acl_callback(struct ldb_request *req, struct ldb_reply *ares)
 	struct ldb_context *ldb;
 	struct kludge_acl_context *ac;
 	struct kludge_private_data *data;
-	int i, ret;
+	unsigned int i;
+	int ret;
 
 	ac = talloc_get_type(req->context, struct kludge_acl_context);
 	data = talloc_get_type(ldb_module_get_private(ac->module), struct kludge_private_data);
@@ -310,7 +313,8 @@ static int kludge_acl_search(struct ldb_module *module, struct ldb_request *req)
 	struct ldb_request *down_req;
 	struct kludge_private_data *data;
 	const char * const *attrs;
-	int ret, i;
+	int ret;
+	unsigned int i;
 
 	ldb = ldb_module_get_ctx(module);
 
@@ -436,7 +440,8 @@ static int kludge_acl_extended(struct ldb_module *module, struct ldb_request *re
 static int kludge_acl_init(struct ldb_module *module)
 {
 	struct ldb_context *ldb;
-	int ret, i;
+	int ret;
+	unsigned int i;
 	TALLOC_CTX *mem_ctx = talloc_new(module);
 	static const char *attrs[] = { "passwordAttribute", NULL };
 	struct ldb_result *res;
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index 4c326bc..9bea7db 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -41,7 +41,7 @@ static int linked_attributes_fix_links(struct ldb_module *module,
 				       struct ldb_message_element *el, struct dsdb_schema *schema,
 				       const struct dsdb_attribute *schema_attr)
 {
-	int i;
+	unsigned int i;
 	TALLOC_CTX *tmp_ctx = talloc_new(module);
 	struct ldb_context *ldb = ldb_module_get_ctx(module);
 	const struct dsdb_attribute *target;
@@ -58,7 +58,8 @@ static int linked_attributes_fix_links(struct ldb_module *module,
 
 	for (i=0; i<el->num_values; i++) {
 		struct dsdb_dn *dsdb_dn;
-		int ret, j;
+		unsigned int j;
+		int ret;
 		struct ldb_result *res;
 		struct ldb_message *msg;
 		struct ldb_message_element *el2;
@@ -144,7 +145,8 @@ static int linked_attributes_rename(struct ldb_module *module, struct ldb_reques
 {
 	struct ldb_result *res;
 	struct ldb_message *msg;
-	int ret, i;
+	unsigned int i;
+	int ret;
 	struct ldb_context *ldb = ldb_module_get_ctx(module);
 	struct dsdb_schema *schema = dsdb_get_schema(ldb);
 	/*
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index 8bcac11..d5e28d3 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -93,7 +93,7 @@ static int objectclass_sort(struct ldb_module *module,
 			    struct class_list **sorted_out) 
 {
 	struct ldb_context *ldb;
-	int i, lowest;
+	unsigned int i, lowest;
 	struct class_list *unsorted = NULL, *sorted = NULL, *current = NULL, *poss_parent = NULL, *new_parent = NULL, *current_lowest = NULL;
 
 	ldb = ldb_module_get_ctx(module);
@@ -178,7 +178,7 @@ static int objectclass_sort(struct ldb_module *module,
 
 	do
 	{
-		lowest = INT_MAX;
+		lowest = UINT_MAX;
 		current_lowest = NULL;
 		for (current = unsorted; schema && current; current = current->next) {
 			if(current->objectclass->subClass_order < lowest) {
diff --git a/source4/dsdb/samdb/ldb_modules/objectguid.c b/source4/dsdb/samdb/ldb_modules/objectguid.c
index bfbf2b4..7f95c97 100644
--- a/source4/dsdb/samdb/ldb_modules/objectguid.c
+++ b/source4/dsdb/samdb/ldb_modules/objectguid.c
@@ -37,7 +37,7 @@
 
 static struct ldb_message_element *objectguid_find_attribute(const struct ldb_message *msg, const char *name)
 {
-	int i;
+	unsigned int i;
 
 	for (i = 0; i < msg->num_elements; i++) {
 		if (ldb_attr_cmp(name, msg->elements[i].name) == 0) {
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 9d59b54..19bd036 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -41,8 +41,8 @@ struct partition_context {
 	struct ldb_request *req;
 
 	struct part_request *part_req;
-	int num_requests;
-	int finished_requests;
+	unsigned int num_requests;
+	unsigned int finished_requests;
 
 	const char **referrals;
 };
@@ -91,7 +91,7 @@ static struct dsdb_partition *find_partition(struct partition_private_data *data
 					     struct ldb_dn *dn,
 					     struct ldb_request *req)
 {
-	int i;
+	unsigned int i;
 	struct ldb_control *partition_ctrl;
 
 	/* see if the request has the partition DN specified in a
@@ -365,7 +365,7 @@ static int partition_send_all(struct ldb_module *module,
 			      struct partition_context *ac, 
 			      struct ldb_request *req) 
 {
-	int i;
+	unsigned int i;
 	struct partition_private_data *data = talloc_get_type(module->private_data, 
 							      struct partition_private_data);
 	int ret = partition_prep_request(ac, NULL);
@@ -390,7 +390,7 @@ static int partition_send_all(struct ldb_module *module,
 static int partition_replicate(struct ldb_module *module, struct ldb_request *req, struct ldb_dn *dn) 
 {
 	struct partition_context *ac;
-	unsigned i;
+	unsigned int i;
 	int ret;
 	struct dsdb_partition *partition;
 	struct partition_private_data *data = talloc_get_type(module->private_data, 
@@ -710,7 +710,8 @@ static int partition_rename(struct ldb_module *module, struct ldb_request *req)
 /* start a transaction */
 static int partition_start_trans(struct ldb_module *module)
 {
-	int i, ret;
+	unsigned int i;
+	int ret;
 	struct partition_private_data *data = talloc_get_type(module->private_data, 
 							      struct partition_private_data);
 	/* Look at base DN */
@@ -753,7 +754,7 @@ static int partition_start_trans(struct ldb_module *module)
 /* prepare for a commit */
 static int partition_prepare_commit(struct ldb_module *module)
 {
-	int i;
+	unsigned int i;
 	struct partition_private_data *data = talloc_get_type(module->private_data, 
 							      struct partition_private_data);
 
@@ -783,7 +784,8 @@ static int partition_prepare_commit(struct ldb_module *module)
 /* end a transaction */
 static int partition_end_trans(struct ldb_module *module)
 {
-	int i, ret, ret2;
+	int ret, ret2;
+	unsigned int i;
 	struct partition_private_data *data = talloc_get_type(module->private_data, 
 							      struct partition_private_data);
 
@@ -823,7 +825,8 @@ static int partition_end_trans(struct ldb_module *module)
 /* delete a transaction */
 static int partition_del_trans(struct ldb_module *module)
 {
-	int i, ret, final_ret = LDB_SUCCESS;
+	int ret, final_ret = LDB_SUCCESS;
+	unsigned int i;
 	struct partition_private_data *data = talloc_get_type(module->private_data, 
 							      struct partition_private_data);
 	for (i=0; data && data->partitions && data->partitions[i]; i++) {
@@ -915,7 +918,8 @@ int partition_primary_sequence_number(struct ldb_module *module, TALLOC_CTX *mem
 /* FIXME: This function is still semi-async */
 static int partition_sequence_number(struct ldb_module *module, struct ldb_request *req)
 {
-	int i, ret;
+	int ret;
+	unsigned int i;
 	uint64_t seq_number = 0;
 	uint64_t timestamp_sequence = 0;
 	uint64_t timestamp = 0;
diff --git a/source4/dsdb/samdb/ldb_modules/partition_init.c b/source4/dsdb/samdb/ldb_modules/partition_init.c
index 5dcd88a..b3b52e3 100644
--- a/source4/dsdb/samdb/ldb_modules/partition_init.c
+++ b/source4/dsdb/samdb/ldb_modules/partition_init.c
@@ -77,7 +77,7 @@ static int partition_load_replicate_dns(struct ldb_context *ldb, struct partitio
 static int partition_load_modules(struct ldb_context *ldb, 
 				  struct partition_private_data *data, struct ldb_message *msg) 
 {
-	int i;
+	unsigned int i;
 	struct ldb_message_element *modules_attributes = ldb_msg_find_element(msg, "modules");
 	talloc_free(data->modules);
 	if (!modules_attributes) {
@@ -176,7 +176,7 @@ static int partition_reload_metadata(struct ldb_module *module, struct partition
 
 static const char **find_modules_for_dn(struct partition_private_data *data, struct ldb_dn *dn) 
 {
-	int i;
+	unsigned int i;
 	struct partition_module *default_mod = NULL;
 	for (i=0; data->modules && data->modules[i]; i++) {
 		if (!data->modules[i]->dn) {
@@ -347,7 +347,9 @@ static int partition_register(struct ldb_context *ldb, struct dsdb_control_curre
 static int add_partition_to_data(struct ldb_context *ldb, struct partition_private_data *data,
 				 struct dsdb_partition *partition)
 {
-	int i, ret;
+	unsigned int i;
+	int ret;
+
 	/* Count the partitions */
 	for (i=0; data->partitions && data->partitions[i]; i++) { /* noop */};
 	
@@ -374,7 +376,8 @@ int partition_reload_if_required(struct ldb_module *module,
 				 struct partition_private_data *data)
 {
 	uint64_t seq;
-	int ret, i;
+	int ret;
+	unsigned int i;
 	struct ldb_context *ldb = ldb_module_get_ctx(module);
 	struct ldb_message *msg;
 	struct ldb_message_element *partition_attributes;
@@ -412,7 +415,7 @@ int partition_reload_if_required(struct ldb_module *module,
 	partition_attributes = ldb_msg_find_element(msg, "partition");
 
 	for (i=0; partition_attributes && i < partition_attributes->num_values; i++) {
-		int j;
+		unsigned int j;
 		bool new_partition = true;
 		const char *filename = NULL;
 		DATA_BLOB dn_blob;
@@ -536,7 +539,8 @@ static int new_partition_set_replicated_metadata(struct ldb_context *ldb,
 						 struct partition_private_data *data, 
 						 struct dsdb_partition *partition)
 {
-	int i, ret;
+	unsigned int i;
+	int ret;
 	/* for each replicate, copy from main partition.  If we get an error, we report it up the chain */
 	for (i=0; data->replicate && data->replicate[i]; i++) {
 		struct ldb_result *replicate_res;
@@ -664,7 +668,8 @@ static int new_partition_set_replicated_metadata(struct ldb_context *ldb,
  * instanceType */
 int partition_create(struct ldb_module *module, struct ldb_request *req)
 {
-	int i, ret;
+	unsigned int i;
+	int ret;
 	struct ldb_context *ldb = ldb_module_get_ctx(module);
 	struct ldb_request *mod_req, *last_req = req;
 	struct ldb_message *mod_msg;
diff --git a/source4/dsdb/samdb/ldb_modules/proxy.c b/source4/dsdb/samdb/ldb_modules/proxy.c
index 87b1a6e..616563e 100644
--- a/source4/dsdb/samdb/ldb_modules/proxy.c
+++ b/source4/dsdb/samdb/ldb_modules/proxy.c
@@ -165,7 +165,7 @@ failed:
 static void proxy_convert_blob(TALLOC_CTX *mem_ctx, struct ldb_val *v,
 			       const char *oldstr, const char *newstr)
 {
-	int len1, len2, len3;
+	size_t len1, len2, len3;
 	uint8_t *olddata = v->data;
 	char *p = strcasestr((char *)v->data, oldstr);
 
@@ -184,7 +184,7 @@ static void proxy_convert_blob(TALLOC_CTX *mem_ctx, struct ldb_val *v,
 */
 static void proxy_convert_value(struct proxy_data *proxy, struct ldb_message *msg, struct ldb_val *v)
 {
-	int i;
+	size_t i;
 
 	for (i=0;proxy->oldstr[i];i++) {
 		char *p = strcasestr((char *)v->data, proxy->oldstr[i]);
@@ -201,7 +201,7 @@ static struct ldb_parse_tree *proxy_convert_tree(TALLOC_CTX *mem_ctx,
 						 struct proxy_data *proxy,
 						 struct ldb_parse_tree *tree)
 {
-	int i;
+	size_t i;
 	char *expression = ldb_filter_from_tree(mem_ctx, tree);
 
 	for (i=0;proxy->newstr[i];i++) {
@@ -225,7 +225,7 @@ static void proxy_convert_record(struct ldb_context *ldb,
 				 struct proxy_data *proxy,
 				 struct ldb_message *msg)
 {
-	int attr, v;
+	unsigned int attr, v;
 
 	/* fix the message DN */
 	if (ldb_dn_compare_base(proxy->olddn, msg->dn) == 0) {
@@ -307,7 +307,8 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re
 	struct proxy_data *proxy = talloc_get_type(ldb_module_get_private(module), struct proxy_data);
 	struct ldb_request *newreq;
 	struct ldb_dn *base;
-	int ret, i;
+	unsigned int i;
+	int ret;
 
 	ldb = ldb_module_get_ctx(module);
 
diff --git a/source4/dsdb/samdb/ldb_modules/ranged_results.c b/source4/dsdb/samdb/ldb_modules/ranged_results.c
index 5ce69a2..7639aef 100644
--- a/source4/dsdb/samdb/ldb_modules/ranged_results.c
+++ b/source4/dsdb/samdb/ldb_modules/ranged_results.c
@@ -58,7 +58,7 @@ static int rr_search_callback(struct ldb_request *req, struct ldb_reply *ares)
 {
 	struct ldb_context *ldb;
 	struct rr_context *ac;
-	int i, j;
+	unsigned int i, j;
 
 	ac = talloc_get_type(req->context, struct rr_context);
 	ldb = ldb_module_get_ctx(ac->module);
@@ -174,7 +174,7 @@ static int rr_search_callback(struct ldb_request *req, struct ldb_reply *ares)
 static int rr_search(struct ldb_module *module, struct ldb_request *req)
 {
 	struct ldb_context *ldb;
-	int i;
+	unsigned int i;
 	unsigned int start, end;
 	const char **new_attrs = NULL;
 	bool found_rr = false;
diff --git a/source4/dsdb/samdb/ldb_modules/resolve_oids.c b/source4/dsdb/samdb/ldb_modules/resolve_oids.c
index ba41033..5ff246b 100644
--- a/source4/dsdb/samdb/ldb_modules/resolve_oids.c
+++ b/source4/dsdb/samdb/ldb_modules/resolve_oids.c
@@ -90,7 +90,7 @@ static int resolve_oids_parse_tree_need(struct ldb_context *ldb,
 					struct dsdb_schema *schema,
 					const struct ldb_parse_tree *tree)
 {
-	int i;
+	unsigned int i;
 	const struct dsdb_attribute *a = NULL;
 	const char *attr;
 	const char *p1;
@@ -169,7 +169,7 @@ static int resolve_oids_element_need(struct ldb_context *ldb,
 				     struct dsdb_schema *schema,
 				     const struct ldb_message_element *el)
 {
-	int i;
+	unsigned int i;
 	const struct dsdb_attribute *a = NULL;
 	const char *p1;
 
@@ -285,7 +285,7 @@ static int resolve_oids_parse_tree_replace(struct ldb_context *ldb,
 					   struct dsdb_schema *schema,
 					   struct ldb_parse_tree *tree)
 {
-	int i;
+	unsigned int i;
 	const struct dsdb_attribute *a = NULL;
 	const char **attrp;
 	const char *p1;
@@ -366,7 +366,7 @@ static int resolve_oids_element_replace(struct ldb_context *ldb,
 					struct dsdb_schema *schema,
 					struct ldb_message_element *el)
 {
-	int i;
+	unsigned int i;
 	const struct dsdb_attribute *a = NULL;
 	const char *p1;
 
@@ -399,7 +399,7 @@ static int resolve_oids_message_replace(struct ldb_context *ldb,
 					struct dsdb_schema *schema,
 					struct ldb_message *msg)
 {
-	int i;
+	unsigned int i;
 
 	for (i=0; i < msg->num_elements; i++) {
 		int ret;
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index d5a3499..bd46ec5 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -31,9 +31,9 @@
 #include "librpc/ndr/libndr.h"
 
 struct private_data {
-	int num_controls;
+	unsigned int num_controls;
 	char **controls;
-	int num_partitions;
+	unsigned int num_partitions;
 	struct ldb_dn **partitions;
 };
 
@@ -195,7 +195,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
 	}
 
 	if (priv && do_attribute(attrs, "supportedControl")) {
- 		int i;
+		unsigned int i;
 		for (i = 0; i < priv->num_controls; i++) {
 			char *control = talloc_strdup(msg, priv->controls[i]);
 			if (!control) {
@@ -209,7 +209,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
  	}
 
 	if (priv && do_attribute(attrs, "namingContexts")) {
-		int i;
+		unsigned int i;
 		for (i = 0; i < priv->num_partitions; i++) {
 			struct ldb_dn *dn = priv->partitions[i];
 			if (ldb_msg_add_steal_string(msg, "namingContexts",
@@ -222,7 +222,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
 	server_sasl = talloc_get_type(ldb_get_opaque(ldb, "supportedSASLMechanims"), 
 				       char *);
 	if (server_sasl && do_attribute(attrs, "supportedSASLMechanisms")) {
-		int i;
+		unsigned int i;
 		for (i = 0; server_sasl && server_sasl[i]; i++) {
 			char *sasl_name = talloc_strdup(msg, server_sasl[i]);
 			if (!sasl_name) {
@@ -248,7 +248,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
 
 	if (schema && do_attribute_explicit(attrs, "dsSchemaAttrCount")) {
 		struct dsdb_attribute *cur;
-		uint32_t n = 0;
+		unsigned int n = 0;
 
 		for (cur = schema->attributes; cur; cur = cur->next) {
 			n++;
@@ -262,7 +262,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
 
 	if (schema && do_attribute_explicit(attrs, "dsSchemaClassCount")) {
 		struct dsdb_class *cur;
-		uint32_t n = 0;
+		unsigned int n = 0;
 
 		for (cur = schema->classes; cur; cur = cur->next) {
 			n++;
@@ -354,7 +354,8 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
 	   to expand the DNs to have GUID and SID. W2K8 join relies on
 	   this */
 	if (edn_control) {
-		int i, ret;
+		unsigned int i;
+		int ret;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list