From a9183c39581350b1e5a1d0cfaa3d070a2845c8fb Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Mon, 20 Jul 2015 11:40:43 +0000 Subject: [PATCH] get_robust_list.c: use printnum_long * get_robust_list.c (sys_get_robust_list): Use printnum_long. --- get_robust_list.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/get_robust_list.c b/get_robust_list.c index d9e0f1aa..02f81482 100644 --- a/get_robust_list.c +++ b/get_robust_list.c @@ -5,24 +5,9 @@ SYS_FUNC(get_robust_list) if (entering(tcp)) { tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]); } else { - void *addr; - size_t len; - - if (syserror(tcp) || - !tcp->u_arg[1] || - umove(tcp, tcp->u_arg[1], &addr) < 0) { - tprintf("%#lx, ", tcp->u_arg[1]); - } else { - tprintf("[%p], ", addr); - } - - if (syserror(tcp) || - !tcp->u_arg[2] || - umove(tcp, tcp->u_arg[2], &len) < 0) { - tprintf("%#lx", tcp->u_arg[2]); - } else { - tprintf("[%lu]", (unsigned long) len); - } + printnum_long(tcp, tcp->u_arg[1], "%#lx"); + tprints(", "); + printnum_long(tcp, tcp->u_arg[2], "%lu"); } return 0; } -- 2.40.0