LWN.net Logo

Trees II: red-black trees

Trees II: red-black trees

Posted Jun 29, 2006 6:36 UTC (Thu) by alonz (subscriber, #815)
Parent article: Trees II: red-black trees

I believe there is a small error in the insertion code: the line

    struct my_stuff *stuff = rb_entry(parent, struct my_stuff, parent);
should have been written as
    struct my_stuff *stuff = rb_entry(parent, struct my_stuff, node);


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds