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 <lian...@ucweb.com> --- sheep/cluster/zookeeper.c | 1 + 1 file changed, 1 insertion(+) 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@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog