summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c8
-rw-r--r--source4/lib/ldb/common/ldb_msg.c6
-rw-r--r--source4/lib/ldb/common/ldb_parse.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index b08c616a05..8c912f76d4 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -122,7 +122,7 @@ char *ldb_base64_encode(struct ldb_context *ldb, const char *buf, int len)
*/
int ldb_should_b64_encode(const struct ldb_val *val)
{
- int i;
+ unsigned int i;
uint8_t *p = val->data;
if (val->length == 0 || p[0] == ' ' || p[0] == ':') {
@@ -146,7 +146,7 @@ int ldb_should_b64_encode(const struct ldb_val *val)
static int fold_string(int (*fprintf_fn)(void *, const char *, ...), void *private_data,
const char *buf, size_t length, int start_pos)
{
- int i;
+ unsigned int i;
int total=0, ret;
for (i=0;i<length;i++) {
@@ -201,7 +201,7 @@ int ldb_ldif_write(struct ldb_context *ldb,
void *private_data,
const struct ldb_ldif *ldif)
{
- int i, j;
+ unsigned int i, j;
int total=0, ret;
const struct ldb_message *msg;
@@ -410,7 +410,7 @@ static int next_attr(char **s, const char **attr, struct ldb_val *value)
void ldb_ldif_read_free(struct ldb_context *ldb, struct ldb_ldif *ldif)
{
struct ldb_message *msg = &ldif->msg;
- int i;
+ unsigned int i;
for (i=0;i<msg->num_elements;i++) {
if (msg->elements[i].name) ldb_free(ldb, msg->elements[i].name);
if (msg->elements[i].values) ldb_free(ldb, msg->elements[i].values);
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c
index 0d5b47f920..170a7ae5e4 100644
--- a/source4/lib/ldb/common/ldb_msg.c
+++ b/source4/lib/ldb/common/ldb_msg.c
@@ -41,7 +41,7 @@
struct ldb_message_element *ldb_msg_find_element(const struct ldb_message *msg,
const char *attr_name)
{
- int i;
+ unsigned int i;
for (i=0;i<msg->num_elements;i++) {
if (ldb_attr_cmp(msg->elements[i].name, attr_name) == 0) {
return &msg->elements[i];
@@ -74,7 +74,7 @@ int ldb_val_equal_exact(const struct ldb_val *v1, const struct ldb_val *v2)
struct ldb_val *ldb_msg_find_val(const struct ldb_message_element *el,
struct ldb_val *val)
{
- int i;
+ unsigned int i;
for (i=0;i<el->num_values;i++) {
if (ldb_val_equal_exact(val, &el->values[i])) {
return &el->values[i];
@@ -185,7 +185,7 @@ int ldb_msg_add_string(struct ldb_context *ldb, struct ldb_message *msg,
int ldb_msg_element_compare(struct ldb_message_element *el1,
struct ldb_message_element *el2)
{
- int i;
+ unsigned int i;
if (el1->num_values != el2->num_values) {
return el1->num_values - el2->num_values;
diff --git a/source4/lib/ldb/common/ldb_parse.c b/source4/lib/ldb/common/ldb_parse.c
index d61d65548c..b037284a24 100644
--- a/source4/lib/ldb/common/ldb_parse.c
+++ b/source4/lib/ldb/common/ldb_parse.c
@@ -344,7 +344,7 @@ struct ldb_parse_tree *ldb_parse_tree(struct ldb_context *ldb, const char *s)
*/
void ldb_parse_tree_free(struct ldb_context *ldb, struct ldb_parse_tree *tree)
{
- int i;
+ unsigned int i;
switch (tree->operation) {
case LDB_OP_SIMPLE: