From: Mathieu Desnoyers Date: Thu, 2 Jun 2011 17:33:31 +0000 (-0400) Subject: Fix search range comparison X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3d8a234b1bcfa2e6473a341e44ab36209ded5f77;p=urcu.git Fix search range comparison Signed-off-by: Mathieu Desnoyers --- 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;