diff options
author | Leon Chen <chen.bao.yi@qq.com> | 2017-07-20 17:24:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 17:24:38 +0800 |
commit | 9e7a8c0207bab8045dc2938a21657d711a9c4953 (patch) | |
tree | c4c5c7c924e7eac87346702f83380b5b91a818df | |
parent | 2cdf4cc656cd74aa7c29360b13cf07d3e0e72afb (diff) | |
download | redis-9e7a8c0207bab8045dc2938a21657d711a9c4953.tar.gz |
fix return wrong value of clusterDelNodeSlots
-rw-r--r-- | src/cluster.c | 6 |
1 files 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; } |