ldb: reduce non-transitive comparisons in ldb_msg_element_compare()
commit21a071e4864dd739840c2ad4adb0c71ec33f8427
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 3 Apr 2024 22:26:25 +0000 (4 11:26 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 10 Apr 2024 22:56:33 +0000 (10 22:56 +0000)
tree51b8ff7ffea5a5ea5d6344a0248299b4268ea639
parent5c36bc82415b246fccec9eae693da82b7aa45b81
ldb: reduce non-transitive comparisons in ldb_msg_element_compare()

We can still have inconsistent comparisons, because two elements with
the same number of values will always return -1 if they are unequal,
which means they will sort differently depending on the order in which
they are compared.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15625

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/common/ldb_msg.c