]> granicus.if.org Git - strace/commitdiff
Remove unreachable code in umoven() and umovestr().
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Oct 2011 15:26:15 +0000 (15:26 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Oct 2011 15:26:15 +0000 (15:26 +0000)
* util.c (umoven, umovestr): Remove unreachable code.

Reported-by: Weichuan Yan <wchyan@marvell.com>
util.c

diff --git a/util.c b/util.c
index 0658bc0a18149c27416f1ef3b225578b138f5c2e..3e83cb6199a1b3e60ce8dc36b9ce3a66c4fb4f07 100644 (file)
--- a/util.c
+++ b/util.c
@@ -792,10 +792,6 @@ umoven(struct tcb *tcp, long addr, int len, char *laddr)
                errno = 0;
                u.val = ptrace(PTRACE_PEEKDATA, pid, (char *) addr, 0);
                if (errno) {
-                       if (started && (errno==EPERM || errno==EIO)) {
-                               /* Ran into 'end of memory' - stupid "printpath" */
-                               return 0;
-                       }
                        /* But if not started, we had a bogus address. */
                        if (addr != 0 && errno != EIO && errno != ESRCH)
                                perror("ptrace: umoven");
@@ -913,10 +909,6 @@ umovestr(struct tcb *tcp, long addr, int len, char *laddr)
                errno = 0;
                u.val = ptrace(PTRACE_PEEKDATA, pid, (char *)addr, 0);
                if (errno) {
-                       if (started && (errno==EPERM || errno==EIO)) {
-                               /* Ran into 'end of memory' - stupid "printpath" */
-                               return 0;
-                       }
                        if (addr != 0 && errno != EIO && errno != ESRCH)
                                perror("umovestr");
                        return -1;