aboutsummaryrefslogtreecommitdiff
path: root/sys/libbio/phylo.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-09-28 13:39:24 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-09-28 13:39:24 -0700
commitbc53100f1ef063e09d77e8670e1796bc67017411 (patch)
treee84b23c3afceb88f75088be2749683b407d1cea2 /sys/libbio/phylo.c
parent83cd586ea304d6f6aa190c65ee796baaba1941a7 (diff)
Checkin: various small changes
Diffstat (limited to 'sys/libbio/phylo.c')
-rw-r--r--sys/libbio/phylo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/libbio/phylo.c b/sys/libbio/phylo.c
index 920102b..cb5c75c 100644
--- a/sys/libbio/phylo.c
+++ b/sys/libbio/phylo.c
@@ -84,7 +84,7 @@ phylo·countleafs(bio·Node *node, int *n)
{
error err;
bio·Node *child;
-
+
if (!node->nchild) {
*n += 1;
}
@@ -392,7 +392,7 @@ phylo·reroot(bio·Tree *tree, bio·Node *node, double d)
// TODO: should check that node is part of this tree?
// TODO: should we check if node->parent != nil?
-
+
if (fabs(d) < PREC) {
new = node;
rotateparent(node->parent, node);
@@ -402,7 +402,7 @@ phylo·reroot(bio·Tree *tree, bio·Node *node, double d)
rotateparent(new->parent->parent, new->parent);
}
} else {
- new = tree->heap.alloc(tree->h, 1, sizeof(*new));
+ new = tree->mem.alloc(tree->heap, 1, sizeof(*new));
memset(new, 0, sizeof(*new));
phylo·addchild(new, node);