Module: kamailio
Branch: 5.3
Commit: a5d2abed49bde56f4bdda42aa6a941f419186baf
URL:
https://github.com/kamailio/kamailio/commit/a5d2abed49bde56f4bdda42aa6a941f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-05-01T09:54:04+02:00
redis: init variables to get rid of compile warnings
- GH #2298
(cherry picked from commit f1de08eef86dc2cd98509c90fa8b28212d47ca37)
---
Modified: src/modules/db_redis/redis_table.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a5d2abed49bde56f4bdda42aa6a941f…
Patch:
https://github.com/kamailio/kamailio/commit/a5d2abed49bde56f4bdda42aa6a941f…
---
diff --git a/src/modules/db_redis/redis_table.c b/src/modules/db_redis/redis_table.c
index ed8105d807..721d31d8ea 100644
--- a/src/modules/db_redis/redis_table.c
+++ b/src/modules/db_redis/redis_table.c
@@ -495,13 +495,13 @@ int db_redis_parse_keys(km_redis_con_t *con) {
str type_name;
str column_name;
- struct str_hash_entry *table_entry;
- redis_table_t *table;
- redis_type_t *type;
- redis_type_t *type_target;
- redis_key_t *key;
- redis_key_t **key_target;
- redis_key_t *key_location;
+ struct str_hash_entry *table_entry = NULL;
+ redis_table_t *table = NULL;
+ redis_type_t *type = NULL;
+ redis_type_t *type_target = NULL;
+ redis_key_t *key = NULL;
+ redis_key_t **key_target = NULL;
+ redis_key_t *key_location = NULL;
enum {
DBREDIS_KEYS_TABLE_ST,
@@ -641,13 +641,13 @@ int db_redis_parse_schema(km_redis_con_t *con) {
struct dirent* dent;
char *dir_name;
- str table_name;
+ str table_name = str_init("");
str column_name;
str type_name;
- struct str_hash_entry *table_entry;
- struct str_hash_entry *column_entry;
- redis_table_t *table;
+ struct str_hash_entry *table_entry = NULL;
+ struct str_hash_entry *column_entry = NULL;
+ redis_table_t *table = NULL;
char full_path[_POSIX_PATH_MAX + 1];
int path_len;