Skip to content

Commit

Permalink
db_redis: declare variables at the beginning of the function (GH #2146)
Browse files Browse the repository at this point in the history
- declare variables at the beginning of the function (GH #2146)
- error message: redis_dbase.c: In function 'db_redis_scan_query_keys':
  redis_dbase.c:1086:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (redis_key_t *set_key = set_keys; set_key; set_key = set_key->next)
  • Loading branch information
henningw committed Nov 24, 2019
1 parent b0d7cef commit 278ff3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/db_redis/redis_dbase.c
Expand Up @@ -923,6 +923,7 @@ static int db_redis_scan_query_keys(km_redis_con_t *con, const str *table_name,
char *match = NULL;
int ret;
redisReply *reply = NULL;
redis_key_t *set_key = NULL;
int i, j;

*query_keys = NULL;
Expand Down Expand Up @@ -1083,7 +1084,7 @@ static int db_redis_scan_query_keys(km_redis_con_t *con, const str *table_name,

ret = -1;

for (redis_key_t *set_key = set_keys; set_key; set_key = set_key->next) {
for (set_key = set_keys; set_key; set_key = set_key->next) {
LM_DBG("pulling set members from key '%.*s'\n", set_key->key.len, set_key->key.s);

redis_key_t *query_v = NULL;
Expand Down

0 comments on commit 278ff3a

Please sign in to comment.