From 4a03c700d5391e3fa18f9d9b219936ef5c9eb722 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Tue, 28 Apr 2020 14:12:17 -0700 Subject: struct: tree node children now purely linked list instead of bespoke hybrid --- sys/libbio/io/newick.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/libbio/io/newick.c') diff --git a/sys/libbio/io/newick.c b/sys/libbio/io/newick.c index 6370686..806feaa 100644 --- a/sys/libbio/io/newick.c +++ b/sys/libbio/io/newick.c @@ -381,12 +381,13 @@ dump(bio·Node *node, void *impl, io·Putter out) if (!node) { return 1; } + bio·Node *child; if (node->nchild) { out.put(impl, '('); - dump(node->child[0], impl, out); - for (child = node->child[1]; child != nil; child = child->sibling) { + dump(node->child, impl, out); + for (child = node->child->sibling; child != nil; child = child->sibling) { out.put(impl, ','); dump(child, impl, out); } -- cgit v1.2.1