On 03/01/2012 01:41 PM, [email protected] wrote: > 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)
Good catch. Applied, thanks. Yuan -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
