summaryrefslogtreecommitdiff
path: root/filter/tree_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'filter/tree_test.c')
-rw-r--r--filter/tree_test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/filter/tree_test.c b/filter/tree_test.c
index 5b22a9fe..f3e8ce49 100644
--- a/filter/tree_test.c
+++ b/filter/tree_test.c
@@ -226,8 +226,8 @@ t_find(void)
};
for(looking_up_value.val.i = 0; looking_up_value.val.i < nodes_count; looking_up_value.val.i++)
{
- struct f_tree *found_tree = find_tree(tree, looking_up_value);
- bt_assert((val_compare(looking_up_value, found_tree->from) == 0) && (val_compare(looking_up_value, found_tree->to) == 0));
+ const struct f_tree *found_tree = find_tree(tree, &looking_up_value);
+ bt_assert((val_compare(&looking_up_value, &(found_tree->from)) == 0) && (val_compare(&looking_up_value, &(found_tree->to)) == 0));
}
}
@@ -278,11 +278,11 @@ t_find_ranges(void)
for(*i = 0; *i <= max_value; *i += (uint)bt_random()/nodes_count)
{
- struct f_tree *found_tree = find_tree(tree, needle);
+ const struct f_tree *found_tree = find_tree(tree, &needle);
bt_debug("searching: %u \n", *i);
bt_assert(
- (val_compare(needle, found_tree->from) == 0) || (val_compare(needle, found_tree->to) == 0) ||
- ((val_compare(needle, found_tree->from) == 1) && (val_compare(needle, found_tree->to) == -1))
+ (val_compare(&needle, &(found_tree->from)) == 0) || (val_compare(&needle, &(found_tree->to)) == 0) ||
+ ((val_compare(&needle, &(found_tree->from)) == 1) && (val_compare(&needle, &(found_tree->to)) == -1))
);
}
}