summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-07 19:03:21 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-07 20:18:10 +0100
commit85598be1f967765f65b78940b73187609fc9694d (patch)
tree48c0b863927856d9522e922ffd42a3c5472ffc34
parent632adf73288fe65c19ece464994f8e2c5021116c (diff)
downloadsamba-85598be1f967765f65b78940b73187609fc9694d.tar.gz
samba-85598be1f967765f65b78940b73187609fc9694d.tar.bz2
samba-85598be1f967765f65b78940b73187609fc9694d.zip
s4:extended_dn_out LDB module - change counter variables to "unsigned" where appropriate
-rw-r--r--source4/dsdb/samdb/ldb_modules/extended_dn_out.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
index 2d0ee6a4aa..c986f8fe93 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
@@ -49,7 +49,7 @@ struct extended_dn_out_private {
static bool is_attr_in_list(const char * const * attrs, const char *attr)
{
- int i;
+ unsigned int i;
for (i = 0; attrs[i]; i++) {
if (ldb_attr_cmp(attrs[i], attr) == 0)
@@ -62,7 +62,7 @@ static bool is_attr_in_list(const char * const * attrs, const char *attr)
static char **copy_attrs(void *mem_ctx, const char * const * attrs)
{
char **nattrs;
- int i, num;
+ unsigned int i, num;
for (num = 0; attrs[num]; num++);
@@ -84,7 +84,7 @@ static char **copy_attrs(void *mem_ctx, const char * const * attrs)
static bool add_attrs(void *mem_ctx, char ***attrs, const char *attr)
{
char **nattrs;
- int num;
+ unsigned int num;
for (num = 0; (*attrs)[num]; num++);
@@ -180,7 +180,7 @@ static int handle_dereference_openldap(struct ldb_dn *dn,
{
const struct ldb_val *entryUUIDblob, *sid_blob;
struct ldb_message fake_msg; /* easier to use routines that expect an ldb_message */
- int j;
+ unsigned int j;
fake_msg.num_elements = 0;
@@ -233,7 +233,7 @@ static int handle_dereference_fds(struct ldb_dn *dn,
{
const struct ldb_val *nsUniqueIdBlob, *sidBlob;
struct ldb_message fake_msg; /* easier to use routines that expect an ldb_message */
- int j;
+ unsigned int j;
fake_msg.num_elements = 0;
@@ -318,7 +318,8 @@ static int extended_callback(struct ldb_request *req, struct ldb_reply *ares,
struct extended_search_context *ac;
struct ldb_control *control;
struct dsdb_openldap_dereference_result_control *dereference_control = NULL;
- int ret, i, j;
+ int ret;
+ unsigned int i, j;
struct ldb_message *msg = ares->message;
struct extended_dn_out_private *p;
struct ldb_context *ldb;
@@ -392,7 +393,8 @@ static int extended_callback(struct ldb_request *req, struct ldb_reply *ares,
}
}
- /* Walk the retruned elements (but only if we have a schema to interpret the list with) */
+ /* Walk the returned elements (but only if we have a schema to
+ * interpret the list with) */
for (i = 0; ac->schema && i < msg->num_elements; i++) {
bool make_extended_dn;
const struct dsdb_attribute *attribute;
@@ -734,7 +736,8 @@ static int extended_dn_out_ldb_init(struct ldb_module *module)
static int extended_dn_out_dereference_init(struct ldb_module *module, const char *attrs[])
{
- int ret, i = 0;
+ int ret;
+ unsigned int i = 0;
struct extended_dn_out_private *p = talloc_zero(module, struct extended_dn_out_private);
struct dsdb_extended_dn_store_format *dn_format;
struct dsdb_openldap_dereference_control *dereference_control;