summaryrefslogtreecommitdiff
path: root/src/util/rb_tree_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/rb_tree_test.c')
-rw-r--r--src/util/rb_tree_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/rb_tree_test.c b/src/util/rb_tree_test.c
index c56a90e83c5..a5952b3b52d 100644
--- a/src/util/rb_tree_test.c
+++ b/src/util/rb_tree_test.c
@@ -56,7 +56,7 @@ static int
rb_test_node_cmp_void(const struct rb_node *n, const void *v)
{
struct rb_test_node *tn = rb_node_data(struct rb_test_node, n, node);
- return tn->key - *(int *)v;
+ return *(int *)v - tn->key;
}
static int
@@ -65,7 +65,7 @@ rb_test_node_cmp(const struct rb_node *a, const struct rb_node *b)
struct rb_test_node *ta = rb_node_data(struct rb_test_node, a, node);
struct rb_test_node *tb = rb_node_data(struct rb_test_node, b, node);
- return ta->key - tb->key;
+ return tb->key - ta->key;
}
static void