[sheepdog] [PATCH] sheep: initialize object cache info

Liu Yuan namei.unix at gmail.com
Tue Feb 4 08:17:13 CET 2014


On Tue, Feb 04, 2014 at 12:52:19PM +0900, MORITA Kazutaka wrote:
> This silences valgrind errors.
> 
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
>  sheep/object_cache.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sheep/object_cache.c b/sheep/object_cache.c
> index 09d3950..d51d459 100644
> --- a/sheep/object_cache.c
> +++ b/sheep/object_cache.c
> @@ -1371,6 +1371,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
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog

Applied thanks

Yuan



More information about the sheepdog mailing list