NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/39684 (RB_REMOVE trashes link to tree, when requested to remove object that isn't in tree)
On Oct 7, 11:50am, cube%cubidou.net@localhost (Quentin Garnier) wrote:
-- Subject: Re: lib/39684 (RB_REMOVE trashes link to tree, when requested to
| You know, the fact that you're the one letting your code logic do
| something that it should not do puts you in a very bad position to make
| such comments. If code of yours runs into any of the devices you list,
| could you tell us brands and exact models? I feel kind of worried.
Well, this is really not productive. I think that the submitter here
has a point. The manual page states:
Accordingly, RB_REMOVE() and SPLAY_REMOVE() return the pointer to the
removed element, otherwise they return NULL to indicate an error.
Looking at the red-black code this is a lie. It never returns NULL and it
should really either:
1. not trash the tree or
2. at least document that it will trash the tree
christos
Home |
Main Index |
Thread Index |
Old Index