ldb:"ldb_dn_compare_base" - use "unsigned int" counters
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 16 Oct 2010 13:10:11 +0000 (15:10 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 16 Oct 2010 13:54:13 +0000 (13:54 +0000)
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 16 13:54:13 UTC 2010 on sn-devel-104

source4/lib/ldb/common/ldb_dn.c

index 885433f3e5ced8f12d5fe43e59edb64341d9991f..69018b7bfc7b0fc838b8195a8b6d5293a70503a5 100644 (file)
@@ -1029,7 +1029,7 @@ char *ldb_dn_alloc_casefold(TALLOC_CTX *mem_ctx, struct ldb_dn *dn)
 int ldb_dn_compare_base(struct ldb_dn *base, struct ldb_dn *dn)
 {
        int ret;
-       long long int n_base, n_dn;
+       unsigned int n_base, n_dn;
 
        if ( ! base || base->invalid) return 1;
        if ( ! dn || dn->invalid) return -1;
@@ -1080,7 +1080,7 @@ int ldb_dn_compare_base(struct ldb_dn *base, struct ldb_dn *dn)
        n_base = base->comp_num - 1;
        n_dn = dn->comp_num - 1;
 
-       while (n_base >= 0) {
+       while (n_base != (unsigned int) -1) {
                char *b_name = base->components[n_base].cf_name;
                char *dn_name = dn->components[n_dn].cf_name;