diff --git a/src/replication.c b/src/replication.c index b7ac98fed940f52e2a93448ae830303012eb79bb..5aa2d5cbed9d2981b65384400b1063ce30609905 100644 --- a/src/replication.c +++ b/src/replication.c @@ -160,7 +160,7 @@ void feedReplicationBacklogWithObject(robj *o) { size_t len; if (o->encoding == REDIS_ENCODING_INT) { - len = ll2string(llstr,sizeof(llstr),(long)o->ptr); + len = ll2string(llstr,sizeof(llstr),(long long)o->ptr); p = llstr; } else { len = sdslen(o->ptr); @@ -1990,7 +1990,7 @@ void replicationCron(void) { } /* Timed out master when we are an already connected slave? */ - if (server.masterhost && server.repl_state == REDIS_REPL_CONNECTED && + if (server.masterhost && server.repl_state == REDIS_REPL_CONNECTED && (time(NULL)-server.master->lastinteraction) > server.repl_timeout) { redisLog(REDIS_WARNING,"MASTER timeout: no data nor PING received..."); diff --git a/src/sentinel.c b/src/sentinel.c index c058dab004562f83b495a3d5c4a6a6364410f4fa..88a45f3bca8b8510367e8826c8a1881b63926224 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -2124,7 +2124,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) { if ((ri->flags & SRI_SLAVE) && role == SRI_SLAVE && (ri->slave_master_port != ri->master->addr->port || - strcasecmp(ri->slave_master_host,ri->master->addr->ip))) + strcasecmp(ri->slave_master_host, ri->master->addr->ip))) { mstime_t wait_time = ri->master->failover_timeout;