summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/openbsd-tree.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/openbsd-tree.c b/lib/openbsd-tree.c
index 7e753554c..d171e14d2 100644
--- a/lib/openbsd-tree.c
+++ b/lib/openbsd-tree.c
@@ -222,12 +222,8 @@ rbe_remove_color(const struct rb_type *t, struct rbt_tree *rbt,
{
struct rb_entry *tmp;
- /* Silence clang possible NULL deference warning. */
- if (parent == NULL)
- return;
-
while ((rbe == NULL || RBE_COLOR(rbe) == RB_BLACK) &&
- rbe != RBH_ROOT(rbt)) {
+ rbe != RBH_ROOT(rbt) && parent) {
if (RBE_LEFT(parent) == rbe) {
tmp = RBE_RIGHT(parent);
if (RBE_COLOR(tmp) == RB_RED) {