From c56f2e023eb8f7191b69bbf080ea61f67e82b1da 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 a516e911f..eeb703b40 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 4b2e5567a3a45987503e9a34bb87dc7c342e6f65 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 eeb703b40..759ed4d06 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; }