summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index efd6968ceb..08ccc7933d 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -354,9 +354,10 @@ int ltdb_filter_attrs(struct ldb_message *msg, const char * const *attrs)
}
for (i = 0; i < msg->num_elements; i++) {
- int j, found;
+ unsigned int j;
+ int found = 0;
- for (j = 0, found = 0; attrs[j]; j++) {
+ for (j = 0; attrs[j]; j++) {
if (ldb_attr_cmp(msg->elements[i].name, attrs[j]) == 0) {
found = 1;
break;