diff options
author | Leon Chen <chen.bao.yi@qq.com> | 2017-07-20 17:24:38 +0800 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2017-07-24 14:18:54 +0200 |
commit | 62474219d0f86f62910d1d6b0832a0153f62cf4b (patch) | |
tree | bd86999b1ab30b9141d9abd56534d96926858544 | |
parent | dc782ceb8384da3272ef4fbeb4a527bb4e0ad9ce (diff) | |
download | redis-62474219d0f86f62910d1d6b0832a0153f62cf4b.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 e7d9fcfe6..a9fedce0c 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -3602,8 +3602,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; } |