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.
This commit is contained in:
antirez 2012-08-28 12:56:05 +02:00
parent 784b93087c
commit c14e0ecafd

View 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));