On Mon, Oct 8, 2018 at 6:03 PM David Gwynne <[email protected]> wrote:
> According to https://github.com/FRRouting/frr/pull/3106, Coverity thinks > I made a copy and paste error regarding one of the augment calls in > RBT_REMOVE. I'm inclined to agree. > > The augment code is only used by uvm_map.c, and it seems to be fine with > this change. I believe it coped because the augment handler it provides > is very conservative and walks all parents on every augment call, so > the code missing one wasn't a problem. > > ok? > Looking at the macro code this was based on in tree.h rev 1.14, I agree it's wrong and the diff is correct: ... if (RB_LEFT(RB_PARENT(old, field), field) == old)\ RB_LEFT(RB_PARENT(old, field), field) = elm;\ else \ RB_RIGHT(RB_PARENT(old, field), field) = elm;\ RB_AUGMENT(RB_PARENT(old, field)); \ ... ok guenther@
