From 80da056c291108e13ab96ec281e8f541e6a21c68 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 6 Nov 2013 11:23:49 +0100 Subject: [PATCH] Sentinel: sentinelSendSlaveOf() was missing a var and the prototype. --- src/sentinel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sentinel.c b/src/sentinel.c index 6bb40762..09052e81 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -327,6 +327,7 @@ sentinelRedisInstance *sentinelSelectSlave(sentinelRedisInstance *master); void sentinelScheduleScriptExecution(char *path, ...); void sentinelStartFailover(sentinelRedisInstance *master, int state); void sentinelDiscardReplyCallback(redisAsyncContext *c, void *reply, void *privdata); +int sentinelSendSlaveOf(sentinelRedisInstance *ri, char *host, int port); /* ========================= Dictionary types =============================== */ @@ -2535,6 +2536,7 @@ char *sentinelGetObjectiveLeader(sentinelRedisInstance *master) { * discarded. */ int sentinelSendSlaveOf(sentinelRedisInstance *ri, char *host, int port) { char portstr[32]; + int retval; ll2string(portstr,sizeof(portstr),port); @@ -2899,7 +2901,6 @@ void sentinelFailoverReconfNextSlave(sentinelRedisInstance *master) { { sentinelRedisInstance *slave = dictGetVal(de); int retval; - char master_port[32]; /* Skip the promoted slave, and already configured slaves. */ if (slave->flags & (SRI_PROMOTED|SRI_RECONF_DONE)) continue;