aboutsummaryrefslogtreecommitdiffstats
path: root/src/symap.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-14 16:04:45 +0100
committerDavid Robillard <d@drobilla.net>2020-12-14 16:04:45 +0100
commit0821550b4d304da8b5f092a75311f13d288dee95 (patch)
treec3bb1c4ba1d497075840b3a820feb4d5164a26c6 /src/symap.c
parent15693714974fd4af7a9bee3e6a0c0f6f439dfde6 (diff)
downloadjalv-0821550b4d304da8b5f092a75311f13d288dee95.tar.gz
jalv-0821550b4d304da8b5f092a75311f13d288dee95.tar.bz2
jalv-0821550b4d304da8b5f092a75311f13d288dee95.zip
Initialize all variables
Diffstat (limited to 'src/symap.c')
-rw-r--r--src/symap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/symap.c b/src/symap.c
index afcdadb..5e33544 100644
--- a/src/symap.c
+++ b/src/symap.c
@@ -107,7 +107,7 @@ symap_search(const Symap* map, const char* sym, bool* exact)
uint32_t lower = 0;
uint32_t upper = map->size - 1;
uint32_t i = upper;
- int cmp;
+ int cmp = 0;
while (upper >= lower) {
i = lower + ((upper - lower) / 2);
@@ -133,7 +133,7 @@ symap_search(const Symap* map, const char* sym, bool* exact)
uint32_t
symap_try_map(Symap* map, const char* sym)
{
- bool exact;
+ bool exact = false;
const uint32_t index = symap_search(map, sym, &exact);
if (exact) {
assert(!strcmp(map->symbols[map->index[index]], sym));
@@ -146,7 +146,7 @@ symap_try_map(Symap* map, const char* sym)
uint32_t
symap_map(Symap* map, const char* sym)
{
- bool exact;
+ bool exact = false;
const uint32_t index = symap_search(map, sym, &exact);
if (exact) {
assert(!strcmp(map->symbols[map->index[index] - 1], sym));