diff options
author | David Robillard <d@drobilla.net> | 2019-10-18 20:07:52 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-10-18 20:15:53 +0200 |
commit | 92e2833403321fe630b22ccdeb00a31fec7785aa (patch) | |
tree | af69201d4ae1d02ce3e57fc179cbbfe6cda4feb7 /zix/ampatree.c | |
parent | 7f9f0d2b6e7ac33e5b2cc5060481a2cc1d429a7d (diff) | |
download | zix-92e2833403321fe630b22ccdeb00a31fec7785aa.tar.gz zix-92e2833403321fe630b22ccdeb00a31fec7785aa.tar.bz2 zix-92e2833403321fe630b22ccdeb00a31fec7785aa.zip |
Fix building as C++
Diffstat (limited to 'zix/ampatree.c')
-rw-r--r-- | zix/ampatree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zix/ampatree.c b/zix/ampatree.c index f0a45a3..58d1332 100644 --- a/zix/ampatree.c +++ b/zix/ampatree.c @@ -108,7 +108,7 @@ zix_ampatree_new(void) { ZixAMPatree* t = (ZixAMPatree*)calloc(1, sizeof(ZixAMPatree)); - t->root = calloc(1, sizeof(ZixAMPatreeNode)); + t->root = (ZixAMPatreeNode*)calloc(1, sizeof(ZixAMPatreeNode)); return t; } @@ -171,8 +171,8 @@ patree_add_edge(ZixAMPatreeNode** n_ptr, child->str = str; child->n_children = 0; - n = realloc_node(n, n->n_children + 1); - ZixAMPatreeNode* m = malloc(zix_ampatree_node_size(n->n_children + 1)); + n = (ZixAMPatreeNode*)realloc_node(n, n->n_children + 1); + ZixAMPatreeNode* m = (ZixAMPatreeNode*)malloc(zix_ampatree_node_size(n->n_children + 1)); m->label_first = n->label_first; m->label_last = n->label_last; m->str = n->str; |