summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-20 10:26:21 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-21 23:41:08 +1100
commitec74ffa8f08d85c55ec7fc592101a21340b9a97d (patch)
treef8756dde2e333642f497c239571e7a1eb8241417
parentd3708109a141f5d6468a89e35176cb56e7a8d821 (diff)
downloadsamba-ec74ffa8f08d85c55ec7fc592101a21340b9a97d.tar.gz
samba-ec74ffa8f08d85c55ec7fc592101a21340b9a97d.tar.bz2
samba-ec74ffa8f08d85c55ec7fc592101a21340b9a97d.zip
s4-schema: a unsigned comparison bug in the schema code
-rw-r--r--source4/dsdb/schema/schema_query.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/dsdb/schema/schema_query.c b/source4/dsdb/schema/schema_query.c
index f563f01272..df17787f38 100644
--- a/source4/dsdb/schema/schema_query.c
+++ b/source4/dsdb/schema/schema_query.c
@@ -31,7 +31,8 @@ static const char **dsdb_full_attribute_list_internal(TALLOC_CTX *mem_ctx,
static int uint32_cmp(uint32_t c1, uint32_t c2)
{
- return c1 - c2;
+ if (c1 == c2) return 0;
+ return c1 > c2 ? 1 : -1;
}
static int strcasecmp_with_ldb_val(const struct ldb_val *target, const char *str)