[PATCH 1/2] readahead: Fix print format for the "count" argument

Dmitry V. Levin ldv at altlinux.org
Thu Sep 1 09:37:36 UTC 2016


On Thu, Sep 01, 2016 at 02:42:48AM +0300, Eugene Syromyatnikov wrote:
> It is size_t (according to documentation and syscalls.h), so "%lu" should
> be used instead of "%ld".
> 
> * readahead.c (SYS_FUNC(readahead)): fix conversion specifier for the
>   "count" argument.
> ---
>  readahead.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/readahead.c b/readahead.c
> index 3f8e4ce..f2b9c80 100644
> --- a/readahead.c
> +++ b/readahead.c
> @@ -6,7 +6,7 @@ SYS_FUNC(readahead)
>  
>  	printfd(tcp, tcp->u_arg[0]);
>  	argn = printllval(tcp, ", %lld", 1);
> -	tprintf(", %ld", tcp->u_arg[argn]);
> +	tprintf(", %lu", tcp->u_arg[argn]);
>  
>  	return RVAL_DECODED;
>  }

Yep.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160901/2b0cdb7b/attachment.bin>


More information about the Strace-devel mailing list