mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-06 14:10:30 +08:00
(dladdr): Remove duplicate code.
This commit is contained in:
parent
cb7029b3a3
commit
3b41ee05b2
17
elf/dladdr.c
17
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user