[CRIU] Re: [PATCH 6/8] hex_dump(): fix printf format warning

Cyrill Gorcunov gorcunov at openvz.org
Tue Jan 31 06:55:42 EST 2012


On Tue, Jan 31, 2012 at 03:31:26PM +0400, Kir Kolyshkin wrote:
> I assume we want to print i here.
> 
> Signed-off-by: Kir Kolyshkin <kir at openvz.org>
> ---
>  util.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/util.c b/util.c
> index 5ee6e50..59f5f87 100644
> --- a/util.c
> +++ b/util.c
> @@ -56,7 +56,7 @@ void hex_dump(void *addr, unsigned long len)
>  
>  	for (i = 0; i < len; i += 8) {
>  		printk("%08lx: %02x %02x %02x %02x %02x %02x %02x %02x\n",
> -		       p, p[i+0], p[i+1], p[i+2], p[i+3],
> +		       i, p[i+0], p[i+1], p[i+2], p[i+3],
>  		       p[i+4], p[i+5], p[i+6], p[i+7]);
>  	}
>  }

Not really. At the left there will be an address of memory instead
of offset.

But I picked up all other patches in series. Thanks Kir!

	Cyrill


More information about the CRIU mailing list