summaryrefslogtreecommitdiffstats
path: root/src/strindex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strindex.c')
-rw-r--r--src/strindex.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/strindex.c b/src/strindex.c
index eae98b2..886d261 100644
--- a/src/strindex.c
+++ b/src/strindex.c
@@ -109,8 +109,8 @@ strindex_add_edge(ZixStrindexNode* n,
char* last)
{
assert(last > first);
- n->children = realloc(n->children,
- (n->num_children + 1) * sizeof(ZixStrindexNode));
+ n->children = (ZixStrindexNode*)realloc(
+ n->children, (n->num_children + 1) * sizeof(ZixStrindexNode));
memset(&n->children[n->num_children], '\0', sizeof(ZixStrindexNode));
@@ -133,7 +133,8 @@ strindex_split_edge(ZixStrindexNode* child,
assert(last > first);
assert(child->first);
- child->children = malloc(sizeof(ZixStrindexNode));
+ child->children = (ZixStrindexNode*)malloc(sizeof(ZixStrindexNode));
+
child->children[0].children = children;
child->children[0].num_children = num_children;
child->children[0].first = child->first;