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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user