Consistently use printaddr for printing addresses
* bjm.c (SYS_FUNC(init_module)): Use printaddr.
* clone.c (SYS_FUNC(clone)): Likewise.
* evdev.c (ff_effect_ioctl): Likewise.
* mtd.c (decode_mtd_oob_buf): Likewise.
* net.c (SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg), SYS_FUNC(getsockopt)):
Likewise.
* print_sigevent.c (print_sigevent): Likewise.
* printsiginfo.c (printsigval, print_si_info): Likewise.
* signal.c (decode_new_sigaction): Likewise.
* sysmips.c (SYS_FUNC(sysmips)): Likewise.
* util.c (printpathn, printstr, umoven_or_printaddr): Likewise.
* v4l2.c (print_v4l2_buffer, print_v4l2_framebuffer,
umoven_or_printaddr_ignore_syserror): Likewise.
* tests/net-icmp_filter.c (main): Update.
Based on patch by Eugene Syromyatnikov <evgsyr@gmail.com>.
diff --git a/signal.c b/signal.c
index f089050..8d36675 100644
--- a/signal.c
+++ b/signal.c
@@ -559,14 +559,16 @@
* be manipulated by strace. In order to prevent the
* compiler from generating code to manipulate
* __sa_handler we cast the function pointers to long. */
+ tprints("{");
if ((long)sa.__sa_handler == (long)SIG_ERR)
- tprints("{SIG_ERR, ");
+ tprints("SIG_ERR");
else if ((long)sa.__sa_handler == (long)SIG_DFL)
- tprints("{SIG_DFL, ");
+ tprints("SIG_DFL");
else if ((long)sa.__sa_handler == (long)SIG_IGN)
- tprints("{SIG_IGN, ");
+ tprints("SIG_IGN");
else
- tprintf("{%#lx, ", (long) sa.__sa_handler);
+ printaddr((unsigned long) sa.__sa_handler);
+ tprints(", ");
/*
* Sigset size is in tcp->u_arg[4] (SPARC)
* or in tcp->u_arg[3] (all other),