util/rb_tree: Reverse the order of comparison functions

The new order matches that of the comparison functions accepted by the C
standard library qsort() functions.  Being consistent with qsort will
hopefully help avoid developer confusion.

The only current user of the red-black tree is aub_mem.c which is pretty
easy to fix up.

Reviewed-by: Lionel Landwerlin <lionel.g.lndwerlin@intel.com>
This commit is contained in:
Jason Ekstrand
2019-09-19 15:17:24 -05:00
parent d35d7346d2
commit dae33052db
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -87,9 +87,9 @@ static inline int
cmp_uint64(uint64_t a, uint64_t b)
{
if (a < b)
return -1;
if (a > b)
return 1;
if (a > b)
return -1;
return 0;
}