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?
Index: lib/libc/gen/tree.c
===================================================================
RCS file: /cvs/src/lib/libc/gen/tree.c,v
retrieving revision 1.1
diff -u -p -r1.1 tree.c
--- lib/libc/gen/tree.c 19 Jun 2017 03:06:26 -0000 1.1
+++ lib/libc/gen/tree.c 9 Oct 2018 02:48:18 -0000
@@ -346,7 +346,7 @@ rbe_remove(const struct rb_type *t, stru
else
RBE_RIGHT(tmp) = rbe;
- rbe_if_augment(t, parent);
+ rbe_if_augment(t, tmp);
} else
RBH_ROOT(rbt) = rbe;
Index: sys/kern/subr_tree.c
===================================================================
RCS file: /cvs/src/sys/kern/subr_tree.c,v
retrieving revision 1.9
diff -u -p -r1.9 subr_tree.c
--- sys/kern/subr_tree.c 8 Jun 2017 03:30:52 -0000 1.9
+++ sys/kern/subr_tree.c 9 Oct 2018 02:48:18 -0000
@@ -346,7 +346,7 @@ rbe_remove(const struct rb_type *t, stru
else
RBE_RIGHT(tmp) = rbe;
- rbe_if_augment(t, parent);
+ rbe_if_augment(t, tmp);
} else
RBH_ROOT(rbt) = rbe;