From 531d7f569e2fc1c385fb294fe7fb81d9b3d371f9 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 16 Oct 2010 15:08:40 +0200 Subject: ldb:"ldb_dn_add_child" - use "unsigned int" counters --- source4/lib/ldb/common/ldb_dn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/lib/ldb/common') diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c index cb680e2e93..885433f3e5 100644 --- a/source4/lib/ldb/common/ldb_dn.c +++ b/source4/lib/ldb/common/ldb_dn.c @@ -1486,7 +1486,7 @@ bool ldb_dn_add_child(struct ldb_dn *dn, struct ldb_dn *child) if (dn->components) { unsigned int n; - long long int i, j; + unsigned int i, j; if (dn->comp_num == 0) { return false; @@ -1514,7 +1514,8 @@ bool ldb_dn_add_child(struct ldb_dn *dn, struct ldb_dn *child) return false; } - for (i = dn->comp_num - 1, j = n - 1; i >= 0; i--, j--) { + for (i = dn->comp_num - 1, j = n - 1; i != (unsigned int) -1; + i--, j--) { dn->components[j] = dn->components[i]; } -- cgit