From 3b41ee05b213fe8217a2e3bea22cf66d0b969f20 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 2 Mar 1998 11:35:33 +0000 Subject: [PATCH] (dladdr): Remove duplicate code. --- elf/dladdr.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/elf/dladdr.c b/elf/dladdr.c index 868a0ed893..55b9caf730 100644 --- a/elf/dladdr.c +++ b/elf/dladdr.c @@ -43,16 +43,13 @@ dladdr (void *address, Dl_info *info) size_t n = match->l_phnum; if (n > 0) { - if (n > 0) - { - do - --n; - while (match->l_phdr[n].p_type != PT_LOAD); - if (addr >= (match->l_addr + - match->l_phdr[n].p_vaddr + match->l_phdr[n].p_memsz)) - /* Off the end of the highest-addressed shared object. */ - return 0; - } + do + --n; + while (match->l_phdr[n].p_type != PT_LOAD); + if (addr >= (match->l_addr + + match->l_phdr[n].p_vaddr + match->l_phdr[n].p_memsz)) + /* Off the end of the highest-addressed shared object. */ + return 0; } } else -- 2.11.4.GIT