summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-20 10:26:06 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-21 23:41:07 +1100
commitd3708109a141f5d6468a89e35176cb56e7a8d821 (patch)
tree45786b18297be47e25f720d4eca0c603017ae344 /source4
parenta106fefcfb0cb60ce439884d8cd0c920d2fb193a (diff)
downloadsamba-d3708109a141f5d6468a89e35176cb56e7a8d821.tar.gz
samba-d3708109a141f5d6468a89e35176cb56e7a8d821.tar.bz2
samba-d3708109a141f5d6468a89e35176cb56e7a8d821.zip
s4-drs: another two unsigned comparison bugs
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 3ae165c6da..3d31cc3f49 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -336,7 +336,7 @@ static int replmd_replPropertyMetaData1_attid_sort(const struct replPropertyMeta
return -1;
}
- return m1->attid - m2->attid;
+ return m1->attid > m2->attid ? 1 : -1;
}
static int replmd_replPropertyMetaDataCtr1_sort(struct replPropertyMetaDataCtr1 *ctr1,
@@ -390,8 +390,10 @@ static int replmd_ldb_message_element_attid_sort(const struct ldb_message_elemen
if (!a1 || !a2) {
return strcasecmp(e1->name, e2->name);
}
-
- return a1->attributeID_id - a2->attributeID_id;
+ if (a1->attributeID_id == a2->attributeID_id) {
+ return 0;
+ }
+ return a1->attributeID_id > a2->attributeID_id ? 1 : -1;
}
static void replmd_ldb_message_sort(struct ldb_message *msg,