[sheepdog] [PATCH 2/2] zookeeper: fix zk_event structure not initialized
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Tue Jul 22 08:27:05 CEST 2014
At Wed, 16 Jul 2014 16:25:32 +0800,
Ruoyu wrote:
>
> If it is not initialized, some values of the members in the struct
> will be incorrect in the output of zk_control lqueue command.
>
> Signed-off-by: Ruoyu <liangry at ucweb.com>
> ---
> sheep/cluster/zookeeper.c | 1 +
> 1 file changed, 1 insertion(+)
Applied this one, thanks.
Hitoshi
>
> diff --git a/sheep/cluster/zookeeper.c b/sheep/cluster/zookeeper.c
> index 30a5f35..64613ca 100644
> --- a/sheep/cluster/zookeeper.c
> +++ b/sheep/cluster/zookeeper.c
> @@ -668,6 +668,7 @@ static int add_event(enum zk_event_type type, struct zk_node *znode, void *buf,
> struct zk_event ev;
> int rc;
>
> + memset(&ev, 0, sizeof(ev));
> ev.id = get_uniq_id();
> ev.type = type;
> ev.sender = *znode;
> --
> 1.8.3.2
>
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
More information about the sheepdog
mailing list