summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-10-01 15:56:14 +0000
committerDavid Robillard <d@drobilla.net>2014-10-01 15:56:14 +0000
commitb56fbb79765b783087d84082bce2379792eb77c1 (patch)
treefc5294b14447de863820193e8d316eafd46a7432
parentb10ae60816015d85ed9aa27fdb98d1b0f6bfdf64 (diff)
downloadzix-b56fbb79765b783087d84082bce2379792eb77c1.tar.gz
zix-b56fbb79765b783087d84082bce2379792eb77c1.tar.bz2
zix-b56fbb79765b783087d84082bce2379792eb77c1.zip
Fix debug checks.
git-svn-id: http://svn.drobilla.net/zix/trunk@96 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
-rw-r--r--zix/patree.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/zix/patree.c b/zix/patree.c
index 9ad3981..464e930 100644
--- a/zix/patree.c
+++ b/zix/patree.c
@@ -199,16 +199,12 @@ patree_find_edge(const ZixPatreeNode* n, const char c, n_edges_t* const index)
#ifndef NDEBUG
ZIX_PRIVATE bool
-patree_node_check(const ZixPatreeNode* const node)
+zix_patree_node_check(ZixPatreeNode* const n)
{
for (n_edges_t i = 0; i < n->num_children; ++i) {
assert(n->children[i] != '\0');
assert(*zix_patree_get_child_ptr(n, i) != NULL);
}
- for (n_edges_t i = 0; i < child->num_children; ++i) {
- assert(child->children[i] != '\0');
- assert(*zix_patree_get_child_ptr(child, i) != NULL);
- }
return true;
}
#endif
@@ -288,8 +284,8 @@ patree_split_edge(ZixPatreeNode** child_ptr,
*child_ptr = child;
- assert(zix_patree_node_check(n));
assert(zix_patree_node_check(child));
+ assert(zix_patree_node_check(grandchild));
}
ZIX_PRIVATE int