This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] elf/dl-lookup.c: Remove unused variable
- From: Marek Polacek <mpolacek at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>, Andreas Schwab <schwab at linux-m68k dot org>
- Date: Tue, 28 Jun 2011 20:18:50 +0200
- Subject: Re: [PATCH] elf/dl-lookup.c: Remove unused variable
- References: <4E09F6AC.1000405@redhat.com> <20110628165751.GB30356@sunsite.ms.mff.cuni.cz>
On 06/28/2011 06:57 PM, Jakub Jelinek wrote:
> This looks wrong, it changes the behavior. If nchain isnt used here,
Yeah, it is wrong, thanks for noticing. I've realized this mistake
just on the way from office... I'm sorry. Here's a correct version.
2011-06-28 Marek Polacek <mpolacek@redhat.com>
* elf/dl-lookup.c (_dl_setup_hash): Remove unused variable.
--- libc/elf/dl-lookup.c.mp 2011-06-28 17:21:09.409592032 +0200
+++ libc/elf/dl-lookup.c 2011-06-28 20:15:10.315574331 +0200
@@ -860,7 +860,6 @@ internal_function
_dl_setup_hash (struct link_map *map)
{
Elf_Symndx *hash;
- Elf_Symndx nchain;
if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
+ DT_THISPROCNUM + DT_VERSIONTAGNUM
@@ -892,8 +891,7 @@ _dl_setup_hash (struct link_map *map)
hash = (void *) D_PTR (map, l_info[DT_HASH]);
map->l_nbuckets = *hash++;
- nchain = *hash++;
- map->l_buckets = hash;
+ map->l_buckets = ++hash;
hash += map->l_nbuckets;
map->l_chain = hash;
}