From 2cdf4cc656cd74aa7c29360b13cf07d3e0e72afb Mon Sep 17 00:00:00 2001 From: Leon Chen Date: Tue, 18 Jul 2017 02:28:24 -0500 Subject: [PATCH 1/2] fix mismatch argument --- src/cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index a516e911..eeb703b4 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -4194,7 +4194,7 @@ void clusterCommand(client *c) { } if ((n = clusterLookupNode(c->argv[4]->ptr)) == NULL) { addReplyErrorFormat(c,"I don't know about node %s", - (char*)c->argv[3]->ptr); + (char*)c->argv[4]->ptr); return; } server.cluster->importing_slots_from[slot] = n; From 9e7a8c0207bab8045dc2938a21657d711a9c4953 Mon Sep 17 00:00:00 2001 From: Leon Chen Date: Thu, 20 Jul 2017 17:24:38 +0800 Subject: [PATCH 2/2] fix return wrong value of clusterDelNodeSlots --- src/cluster.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cluster.c b/src/cluster.c index eeb703b4..759ed4d0 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -3600,8 +3600,10 @@ int clusterDelNodeSlots(clusterNode *node) { int deleted = 0, j; for (j = 0; j < CLUSTER_SLOTS; j++) { - if (clusterNodeGetSlotBit(node,j)) clusterDelSlot(j); - deleted++; + if (clusterNodeGetSlotBit(node,j)) { + clusterDelSlot(j); + deleted++; + } } return deleted; }