tree fc5ce5ed29c230066550a00c5e826e141782cf5b
parent 922477aa70f125183b630609d435d63db97d4f66
author [EMAIL PROTECTED] <[EMAIL PROTECTED]> Sat, 06 Aug 2005 20:58:47 -0300
committer Marcelo Tosatti <[EMAIL PROTECTED]> Sat, 06 Aug 2005 20:58:47 -0300

[PATCH] fix RedBlackTree rb_next/rb_prev functions

I have found a bug in the source of rbtree.c file in /lib. In Kernel 2.6 it's
ok, but 2.4.31 has this error.

We try to use it with the jffs2 source code and only with this fix it work's

Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]>

 lib/rbtree.c |    2 ++
 1 files changed, 2 insertions(+)

diff --git a/lib/rbtree.c b/lib/rbtree.c
--- a/lib/rbtree.c
+++ b/lib/rbtree.c
@@ -332,6 +332,7 @@ rb_node_t *rb_next(rb_node_t *node)
                node = node->rb_right;
                while (node->rb_left)
                        node = node->rb_left;
+               return node;
        /* No right-hand children.  Everything down and left is
@@ -355,6 +356,7 @@ rb_node_t *rb_prev(rb_node_t *node)
                node = node->rb_left;
                while (node->rb_right)
                        node = node->rb_right;   
+               return node;
        /* No left-hand children. Go up till we find an ancestor which
To unsubscribe from this list: send the line "unsubscribe git-commits-24" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to