diff options
Diffstat (limited to 'source4/lib/ldb/ldb_map/ldb_map_outbound.c')
-rw-r--r-- | source4/lib/ldb/ldb_map/ldb_map_outbound.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/source4/lib/ldb/ldb_map/ldb_map_outbound.c b/source4/lib/ldb/ldb_map/ldb_map_outbound.c index 922d13991b..836aec9b1b 100644 --- a/source4/lib/ldb/ldb_map/ldb_map_outbound.c +++ b/source4/lib/ldb/ldb_map/ldb_map_outbound.c @@ -38,7 +38,7 @@ static const char **map_attrs_select_local(struct ldb_module *module, void *mem_ { const struct ldb_map_context *data = map_get_context(module); const char **result; - int i, last; + unsigned int i, last; if (attrs == NULL) return NULL; @@ -81,7 +81,7 @@ static const char **map_attrs_collect_remote(struct ldb_module *module, void *me const char **result; const struct ldb_map_attribute *map; const char *name=NULL; - int i, j, last; + unsigned int i, j, last; int ret; last = 0; @@ -220,7 +220,7 @@ static struct ldb_message_element *ldb_msg_el_map_remote(struct ldb_module *modu const struct ldb_message_element *old) { struct ldb_message_element *el; - int i; + unsigned int i; el = talloc_zero(mem_ctx, struct ldb_message_element); if (el == NULL) { @@ -350,7 +350,8 @@ static int ldb_msg_el_merge_wildcard(struct ldb_module *module, struct ldb_messa const struct ldb_map_context *data = map_get_context(module); const struct ldb_map_attribute *map = map_attr_find_local(data, "*"); struct ldb_message_element *el=NULL; - int i, ret; + unsigned int i; + int ret; /* Perhaps we have a mapping for "*" */ if (map && map->type == LDB_MAP_KEEP) { @@ -392,7 +393,8 @@ static int ldb_msg_el_merge_wildcard(struct ldb_module *module, struct ldb_messa /* Merge two local messages into a single one. */ static int ldb_msg_merge_local(struct ldb_module *module, struct ldb_message *msg1, struct ldb_message *msg2) { - int i, ret; + unsigned int i; + int ret; for (i = 0; i < msg2->num_elements; i++) { ret = ldb_msg_replace(msg1, &msg2->elements[i]); @@ -408,7 +410,8 @@ static int ldb_msg_merge_local(struct ldb_module *module, struct ldb_message *ms static int ldb_msg_merge_remote(struct map_context *ac, struct ldb_message *local, struct ldb_message *remote) { - int i, ret; + unsigned int i; + int ret; const char * const *attrs = ac->all_attrs; if (!attrs) { ret = ldb_msg_el_merge_wildcard(ac->module, local, remote); @@ -520,7 +523,8 @@ static bool ldb_parse_tree_check_splittable(const struct ldb_parse_tree *tree) static int ldb_parse_tree_collect_attrs(struct ldb_module *module, void *mem_ctx, const char ***attrs, const struct ldb_parse_tree *tree) { const char **new_attrs; - int i, ret; + unsigned int i; + int ret; if (tree == NULL) { return 0; @@ -588,7 +592,8 @@ static int map_subtree_select_local_not(struct ldb_module *module, void *mem_ctx /* Select a list of subtrees that query attributes in the local partition */ static int map_subtree_select_local_list(struct ldb_module *module, void *mem_ctx, struct ldb_parse_tree **new, const struct ldb_parse_tree *tree) { - int i, j, ret=0; + unsigned int i, j; + int ret=0; /* Prepare new tree */ *new = talloc_memdup(mem_ctx, tree, sizeof(struct ldb_parse_tree)); @@ -711,7 +716,8 @@ static int map_subtree_collect_remote_not(struct ldb_module *module, void *mem_c /* Collect a list of subtrees that query attributes in the remote partition */ static int map_subtree_collect_remote_list(struct ldb_module *module, void *mem_ctx, struct ldb_parse_tree **new, const struct ldb_parse_tree *tree) { - int i, j, ret=0; + unsigned int i, j; + int ret=0; /* Prepare new tree */ *new = talloc_memdup(mem_ctx, tree, sizeof(struct ldb_parse_tree)); @@ -1051,7 +1057,7 @@ int map_return_entry(struct map_context *ac, struct ldb_reply *ares) struct ldb_message_element *el; const char * const *attrs; struct ldb_context *ldb; - int i; + unsigned int i; ldb = ldb_module_get_ctx(ac->module); |