From: Denys Vlasenko Date: Sat, 28 Jan 2012 01:16:06 +0000 (+0100) Subject: Fix nanosleep decoding: second argument was not shown after success X-Git-Tag: v4.7~189 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea051f75331ee4c7a44d5449a2d136288314879a;p=strace Fix nanosleep decoding: second argument was not shown after success * time.c (sys_nanosleep): Fix bug - inverted is_restart_error() check. * syscall.c (is_restart_error): Remove redundant check. Signed-off-by: Denys Vlasenko --- diff --git a/syscall.c b/syscall.c index 88c97662..25753175 100644 --- a/syscall.c +++ b/syscall.c @@ -716,8 +716,6 @@ int is_restart_error(struct tcb *tcp) { #ifdef LINUX - if (!syserror(tcp)) - return 0; switch (tcp->u_error) { case ERESTARTSYS: case ERESTARTNOINTR: diff --git a/time.c b/time.c index 875d2246..497be75f 100644 --- a/time.c +++ b/time.c @@ -271,7 +271,7 @@ sys_nanosleep(struct tcb *tcp) print_timespec(tcp, tcp->u_arg[0]); tprints(", "); } else { - if (!tcp->u_arg[1] || is_restart_error(tcp)) + if (!tcp->u_arg[1] || !is_restart_error(tcp)) print_timespec(tcp, tcp->u_arg[1]); else tprintf("%#lx", tcp->u_arg[1]);