summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-08-28 12:56:05 +0200
committerantirez <antirez@gmail.com>2012-09-27 13:05:45 +0200
commitd480b9ce7facab3aa96d8a4ef951fccc45930055 (patch)
treeca44344f6f28d7c859a15ca0c463b10c6a4c3898
parentfa23fc3363cd4dacce3044fac2226d31702fe26e (diff)
downloadredis-d480b9ce7facab3aa96d8a4ef951fccc45930055.tar.gz
Sentinel: suppress harmless warning by initializing 'table' to NULL.
Note that the assertion guarantees that one of the if branches setting table is always entered.
-rw-r--r--src/sentinel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sentinel.c b/src/sentinel.c
index 1a70cdbf1..e683279bb 100644
--- a/src/sentinel.c
+++ b/src/sentinel.c
@@ -818,7 +818,7 @@ void sentinelCallClientReconfScript(sentinelRedisInstance *master, int role, cha
sentinelRedisInstance *createSentinelRedisInstance(char *name, int flags, char *hostname, int port, int quorum, sentinelRedisInstance *master) {
sentinelRedisInstance *ri;
sentinelAddr *addr;
- dict *table;
+ dict *table = NULL;
char slavename[128], *sdsname;
redisAssert(flags & (SRI_MASTER|SRI_SLAVE|SRI_SENTINEL));