]> git.eshelyaron.com Git - emacs.git/commitdiff
; * src/itree.c (check_tree): assert that the tree root is black
authorMatt Armstrong <matt@rfc20.org>
Wed, 12 Oct 2022 03:32:08 +0000 (20:32 -0700)
committerMatt Armstrong <matt@rfc20.org>
Wed, 12 Oct 2022 03:43:39 +0000 (20:43 -0700)
src/itree.c

index ef623d0850a7cd81d2134113f5a937a1d7d2bbd7..deef0335cfd14bd27afa2a17037e21fb9f383a9f 100644 (file)
@@ -307,6 +307,7 @@ check_tree (struct interval_tree *tree,
   if (tree->root == ITREE_NULL)
     return true;
   eassert (tree->root->parent == ITREE_NULL);
+  eassert (!check_red_black_invariants || !tree->root->red);
 
   struct interval_node *node = tree->root;
   struct check_subtree_result result