aboutsummaryrefslogtreecommitdiff
path: root/sys/libbio/io/newick.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-04-28 14:12:17 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-04-28 14:12:17 -0700
commit4a03c700d5391e3fa18f9d9b219936ef5c9eb722 (patch)
tree7b2b11b7f7e2479a7c2e51298d4eaa12bd7a2f71 /sys/libbio/io/newick.c
parentf64f5abd9987903ef75f52473efba4dbdeebf0fc (diff)
struct: tree node children now purely linked list instead of bespoke hybrid
Diffstat (limited to 'sys/libbio/io/newick.c')
-rw-r--r--sys/libbio/io/newick.c5
1 files changed, 3 insertions, 2 deletions
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);
}