From 732f39656d933c6112a0586bbefcf8288d57bda4 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Mon, 13 Jun 2011 21:37:40 +0000 Subject: [PATCH] Fix decoding of timer id returned by timer_create * time.c (sys_timer_create): The kernel returns a integer, not a pointer for the timer id in the memory pointed to by timer_id. --- time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/time.c b/time.c index 6d875518..bd4f11e2 100644 --- a/time.c +++ b/time.c @@ -823,12 +823,12 @@ sys_timer_create(struct tcb *tcp) printsigevent(tcp, tcp->u_arg[1]); tprintf(", "); } else { - void *p; + int timer_id; - if (syserror(tcp) || umove(tcp, tcp->u_arg[2], &p) < 0) + if (syserror(tcp) || umove(tcp, tcp->u_arg[2], &timer_id) < 0) tprintf("%#lx", tcp->u_arg[2]); else - tprintf("{%p}", p); + tprintf("{%d}", timer_id); } return 0; } -- 2.50.1