From 3d8a234b1bcfa2e6473a341e44ab36209ded5f77 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 2 Jun 2011 13:33:31 -0400 Subject: [PATCH] Fix search range comparison Signed-off-by: Mathieu Desnoyers --- urcu-rbtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/urcu-rbtree.c b/urcu-rbtree.c index 7cba54c..2d170f2 100644 --- a/urcu-rbtree.c +++ b/urcu-rbtree.c @@ -376,7 +376,7 @@ struct rcu_rbtree_node *rcu_rbtree_search(struct rcu_rbtree *rbtree, && (rbtree->comp(xl->max_end, point) > 0)) { dbg_printf("go left\n"); x = xl; - } else if (rbtree->comp(x->begin, point) >= 0 + } else if (rbtree->comp(x->begin, point) <= 0 && rbtree->comp(point, x->end) < 0) { dbg_printf("got it!\n"); break; -- 2.34.1