summaryrefslogtreecommitdiffstats
path: root/src/strindex.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-31 15:48:28 +0100
committerDavid Robillard <d@drobilla.net>2020-12-31 18:13:35 +0100
commitad42412e3353893ccb365cf357a286b0afe545ba (patch)
treea5b1951eeb2d8a396e5d3d33dbf9cee8d326d6b9 /src/strindex.c
parenta4a67d67cbbed4e027a4587c9956adbd404d097d (diff)
downloadzix-ad42412e3353893ccb365cf357a286b0afe545ba.tar.gz
zix-ad42412e3353893ccb365cf357a286b0afe545ba.tar.bz2
zix-ad42412e3353893ccb365cf357a286b0afe545ba.zip
Initialize all variables
Diffstat (limited to 'src/strindex.c')
-rw-r--r--src/strindex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/strindex.c b/src/strindex.c
index a92b09b..cd1a322 100644
--- a/src/strindex.c
+++ b/src/strindex.c
@@ -153,8 +153,8 @@ strindex_split_edge(ZixStrindexNode* child, size_t index)
static ZixStatus
strindex_insert(ZixStrindexNode* n, char* suffix_first, char* first, char* last)
{
- size_t child_i;
- ZixStrindexNode* child;
+ size_t child_i = 0;
+ ZixStrindexNode* child = NULL;
assert(first <= last);
if (strindex_find_edge(n, *first, &child_i)) {
@@ -199,8 +199,8 @@ zix_strindex_find(ZixStrindex* strindex, const char* const str, char** match)
const char* orig_p = p;
#endif
- ZixStrindexNode* n = strindex->root;
- size_t child_i;
+ ZixStrindexNode* n = strindex->root;
+ size_t child_i = 0;
*match = NULL;