[Sheepdog] [zookeeper][PATCH 2/5] Fix bug: uninitialized callbacked variable in zookeeper driver

Yunkai Zhang yunkai.me at gmail.com
Tue Mar 6 19:10:33 CET 2012


Signed-off-by: Yunkai Zhang <qiushu.zyk at taobao.com>
---
 sheep/cluster/zookeeper.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sheep/cluster/zookeeper.c b/sheep/cluster/zookeeper.c
index 39d9592..23ce4ab 100644
--- a/sheep/cluster/zookeeper.c
+++ b/sheep/cluster/zookeeper.c
@@ -267,6 +267,7 @@ static int add_event(zhandle_t *zh, enum zk_event_type type,
 	ev.type = type;
 	ev.sender = *node;
 	ev.buf_len = buf_len;
+	ev.callbacked = 0;
 	if (buf)
 		memcpy(ev.buf, buf, buf_len);
 
-- 
1.7.7.6




More information about the sheepdog mailing list