aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-19 21:49:25 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-19 21:49:25 +0200
commit694e953cb8f2ce9e2da5c3d41cf056e3911ceca4 (patch)
tree6e01ec2d2d6e55506556effbff6171f4c6efb199
parentdb652d246d7aa391107f1ede4693008dbf36c084 (diff)
libutil.a: make sure str_table_init initializes all fields
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--lib/util/str_table.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/util/str_table.c b/lib/util/str_table.c
index 6363c81..a9d91e5 100644
--- a/lib/util/str_table.c
+++ b/lib/util/str_table.c
@@ -45,6 +45,8 @@ static int strings_grow(str_table_t *table)
int str_table_init(str_table_t *table, size_t size)
{
+ memset(table, 0, sizeof(*table));
+
table->buckets = calloc(size, sizeof(table->buckets[0]));
table->num_buckets = size;