]> git.saurik.com Git - redis.git/commitdiff
Sentinel: suppress harmless warning by initializing 'table' to NULL.
authorantirez <antirez@gmail.com>
Tue, 28 Aug 2012 10:56:05 +0000 (12:56 +0200)
committerantirez <antirez@gmail.com>
Thu, 27 Sep 2012 11:05:45 +0000 (13:05 +0200)
Note that the assertion guarantees that one of the if branches setting
table is always entered.

src/sentinel.c

index 1a70cdbf19a3c475a64d6a350e349a5ccf03e522..e683279bb375fa2661621975f0db16ff5207546a 100644 (file)
@@ -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));