summaryrefslogtreecommitdiff
path: root/system.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2012-05-16 12:20:17 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2012-05-16 12:20:17 +0200
commit048cc42f08ac64a04d14e6de17611a5e7ec3b400 (patch)
tree8159a3ea6f96333dde66a7191129db17430eec9a /system.c
parentc59b3f13fbc50712785cc2635ab12e8152c96aa1 (diff)
downloadstrace-048cc42f08ac64a04d14e6de17611a5e7ec3b400.tar.gz
strace-048cc42f08ac64a04d14e6de17611a5e7ec3b400.tar.bz2
strace-048cc42f08ac64a04d14e6de17611a5e7ec3b400.tar.xz
Stop using non-standard %Zu and %Zd formats for size_t printing
The documented formats are %zu and %zd, but since our (normally disabled) "fast" printf code doesn't support those too, I convert them to %lu and %ld. * bjm.c (sys_query_module): Convert %Zd usages to %lu. * system.c (sys_sysctl): Likewise. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'system.c')
-rw-r--r--system.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/system.c b/system.c
index a776492..8efe90e 100644
--- a/system.c
+++ b/system.c
@@ -845,9 +845,9 @@ sys_sysctl(struct tcb *tcp)
umoven(tcp, (unsigned long) info.name, size, (char *) name) < 0) {
free(name);
if (entering(tcp))
- tprintf("{%p, %d, %p, %p, %p, %Zu}",
+ tprintf("{%p, %d, %p, %p, %p, %lu}",
info.name, info.nlen, info.oldval,
- info.oldlenp, info.newval, info.newlen);
+ info.oldlenp, info.newval, (unsigned long)info.newlen);
return 0;
}
@@ -965,17 +965,18 @@ sys_sysctl(struct tcb *tcp)
#endif
)))) {
printpath(tcp, (size_t)info.oldval);
- tprintf(", %Zu, ", oldlen);
+ tprintf(", %lu, ", (unsigned long)oldlen);
if (info.newval == 0)
tprints("NULL");
else if (syserror(tcp))
tprintf("%p", info.newval);
else
printpath(tcp, (size_t)info.newval);
- tprintf(", %Zd", info.newlen);
+ tprintf(", %ld}", (unsigned long)info.newlen);
} else {
- tprintf("%p, %Zd, %p, %Zd", info.oldval, oldlen,
- info.newval, info.newlen);
+ tprintf("%p, %ld, %p, %ld}",
+ info.oldval, (unsigned long)oldlen,
+ info.newval, (unsigned long)info.newlen);
}
tprints("}");
}