[sheepdog-users] [PATCH stable-0.7 4/5] sheep: initialize object cache info

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Mon Feb 24 07:06:25 CET 2014


From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>

This silences valgrind errors.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 sheep/object_cache.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/sheep/object_cache.c b/sheep/object_cache.c
index f07003d..9e6b71e 100644
--- a/sheep/object_cache.c
+++ b/sheep/object_cache.c
@@ -1407,6 +1407,7 @@ int object_cache_get_info(struct object_cache_info *info)
 {
 	int j = 0;
 
+	memset(info, 0, sizeof(*info));
 	info->used = (uint64_t)gcache.capacity * 1024 * 1024;
 	info->size = (uint64_t)sys->object_cache_size * 1024 * 1024;
 
-- 
1.7.10.4




More information about the sheepdog-users mailing list