From: Dmitry V. Levin Date: Tue, 11 Oct 2011 15:26:15 +0000 (+0000) Subject: Remove unreachable code in umoven() and umovestr(). X-Git-Tag: v4.7~255 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be55ce794aed3395eeb1ca7cfb9a460a8050b82b;p=strace Remove unreachable code in umoven() and umovestr(). * util.c (umoven, umovestr): Remove unreachable code. Reported-by: Weichuan Yan --- diff --git a/util.c b/util.c index 0658bc0a..3e83cb61 100644 --- 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;