emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/noverlay fda8723be6 2/3: ; * src/itree.c (check_tree): assert th


From: Stefan Monnier
Subject: feature/noverlay fda8723be6 2/3: ; * src/itree.c (check_tree): assert that the tree root is black
Date: Wed, 12 Oct 2022 14:01:14 -0400 (EDT)

branch: feature/noverlay
commit fda8723be640593a662d7ff9d4900b7f9e56423e
Author: Matt Armstrong <matt@rfc20.org>
Commit: Matt Armstrong <matt@rfc20.org>

    ; * src/itree.c (check_tree): assert that the tree root is black
---
 src/itree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/itree.c b/src/itree.c
index ef623d0850..deef0335cf 100644
--- a/src/itree.c
+++ b/src/itree.c
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]