]> granicus.if.org Git - strace/commitdiff
readahead: fix print format for the "count" argument
authorEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 31 Aug 2016 23:42:48 +0000 (02:42 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 1 Sep 2016 15:18:11 +0000 (15:18 +0000)
According to documentation and kernel's syscalls.h, its type is size_t,
so "%lu" format should be used instead of "%ld".

* readahead.c (SYS_FUNC(readahead)): Fix conversion specifier
for the "count" argument.

readahead.c

index 3f8e4ceb707c3ddbabd7d051715edf8b0d6e6969..f2b9c8021e36b3430e2e753eb4fa16de0dfa6588 100644 (file)
@@ -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;
 }