From: HaiTing Yao <[email protected]>

The size is not right, maybe lead to error

Signed-off-by: HaiTing Yao <[email protected]>
---
 sheep/cluster/corosync.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sheep/cluster/corosync.c b/sheep/cluster/corosync.c
index fcf1880..f6eec1d 100644
--- a/sheep/cluster/corosync.c
+++ b/sheep/cluster/corosync.c
@@ -130,7 +130,7 @@ static inline void del_cpg_node(struct cpg_node *nodes, 
size_t nr_nodes,
        }
 
        nr_nodes--;
-       memmove(nodes + idx, nodes + idx + 1, sizeof(*nodes) * nr_nodes - idx);
+       memmove(nodes + idx, nodes + idx + 1, sizeof(*nodes) * (nr_nodes - 
idx));
 }
 
 static int nodeid_to_addr(uint32_t nodeid, uint8_t *addr)
-- 
1.7.1

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to