]> granicus.if.org Git - strace/commitdiff
2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 13 Dec 2006 17:03:02 +0000 (17:03 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 13 Dec 2006 17:03:02 +0000 (17:03 +0000)
* time.c (sys_timer_create): Check umove() return code.

ChangeLog
time.c

index 48817b71fbec8b1dc74cc369a3d53b1e54a0b934..08ae0dd4fa0116e79f284b35bbb246ae2cc8bf09 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2006-12-10  Dmitry V. Levin <ldv@altlinux.org>
 
+       * time.c (sys_timer_create): Check umove() return code.
+
        Make several global variables static.
        #ifdef definitions of rarely unused functions.
        * defs.h (rflag, tflag, outfname): Remove.
diff --git a/time.c b/time.c
index b27a71ef3f593ecafbb0dfbcd2beb37c5e29a178..ebd788f36cc31c476761def7ce0c00d7f03c5abf 100644 (file)
--- a/time.c
+++ b/time.c
@@ -475,13 +475,12 @@ struct tcb *tcp;
                printsigevent(tcp, tcp->u_arg[1]);
                tprintf(", ");
        } else {
-               if (syserror(tcp))
+               void *p;
+
+               if (syserror(tcp) || umove(tcp, tcp->u_arg[2], &p) < 0)
                        tprintf("%#lx", tcp->u_arg[2]);
-               else {
-                       void *p;
-                       umove(tcp, tcp->u_arg[2], &p);
+               else
                        tprintf("{%p}", p);
-               }
        }
        return 0;
 }