diff --git a/src/opr/rbtree.c b/src/opr/rbtree.c index 8143e2d552..50e4115b7d 100644 --- a/src/opr/rbtree.c +++ b/src/opr/rbtree.c @@ -40,6 +40,7 @@ #else # include #endif +#include #include "rbtree.h" @@ -422,8 +423,10 @@ opr_rbtree_remove(struct opr_rbtree *head, struct opr_rbtree_node *node) if (node->left == NULL) child = node->right; - else if (node->right == NULL) + else { + opr_Assert(node->right == NULL); child = node->left; + } child->parent = node->parent;