This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] elf/dl-lookup.c: Remove obsolete comment about nested function
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Will Newton <will dot newton at linaro dot org>, libc-alpha at sourceware dot org
- Date: Wed, 02 Apr 2014 14:19:06 -0400
- Subject: Re: [PATCH] elf/dl-lookup.c: Remove obsolete comment about nested function
- Authentication-results: sourceware.org; auth=none
- References: <1396451866-21364-1-git-send-email-will dot newton at linaro dot org>
On 04/02/2014 11:17 AM, Will Newton wrote:
> The nested function referred to has gone away so remove the
> comment. Also move the variable declaration down to where other
> variables of a similar lifetime are declared for clarity.
>
> 2014-04-02 Will Newton <will.newton@linaro.org>
>
> * elf/dl-lookup.c (do_lookup_x): Remove comment
> referring to nested function and move variable
> declarations down to before first use.
Looks good to me.
> ---
> elf/dl-lookup.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
> index d1b8efc..be6f76f 100644
> --- a/elf/dl-lookup.c
> +++ b/elf/dl-lookup.c
> @@ -208,11 +208,6 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
>
> do
> {
> - /* These variables are used in the nested function. */
> - Elf_Symndx symidx;
> - int num_versions = 0;
> - const ElfW(Sym) *versioned_sym = NULL;
> -
> const struct link_map *map = list[i]->l_real;
>
> /* Here come the extra test needed for `_dl_lookup_symbol_skip'. */
> @@ -237,6 +232,10 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
> if (map->l_nbuckets == 0)
> continue;
>
> + Elf_Symndx symidx;
> + int num_versions = 0;
> + const ElfW(Sym) *versioned_sym = NULL;
> +
> /* The tables for this map. */
> const ElfW(Sym) *symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]);
> const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
>
Cheers,
CArlos.