From patchwork Wed Apr 2 15:17:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 389 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id 8D29236007F for ; Wed, 2 Apr 2014 08:18:03 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 3FD8DFDADA4; Wed, 2 Apr 2014 08:18:03 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 029E9FDADA1 for ; Wed, 2 Apr 2014 08:18:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=wxo8s7RHuhs7f/zsaefW9AcA+0Ks4CwOOv+WjEyyASxC3gqi0zIsJ 9+ZYVxLlo7XvLEFcDsN5fXDqlTxtmPO6UEJmoDaJHUO/5P2cMR20/n1+GNtDFyKe yQ/Sxd4GwERQdEFi1RlLRhncFp2pcJFIjJ2di+nzAxdwb6WddUlgvM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=9m6qjUdUz/unGdOSqra+JY1YVyM=; b=BSs2TVKp2QFR3x0YZwq9ECRGKfMN 6MnzoXM89Nk/wgnwuIFKVun3uWvSbJ1yyZJ8J4oWzLAeHZx0+YGwS51Kuu0QbfqS g1YMVOcrJqy7gdmc61RoE6uBd59wb0zRyeBYJWMNmW+Bh1C/otOBkDsR+1CkSq8p y2XginZDTp0zm2E= Received: (qmail 23856 invoked by alias); 2 Apr 2014 15:18:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 23845 invoked by uid 89); 2 Apr 2014 15:17:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f174.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=SSYFohpxswX/inaf9n6iAoVw9c7KDVJ3gKkTZSkNU8c=; b=jSBzxGqQMXZ55aI1K4KJ69okP4c3pocsOLiipw9Kf0J4BM0fUfC0FMObxzIMDnp0Nr 98H2PKLrbX9YIQqupXV97I/uCG2qIqYP2L0ymD86BO3VCp6u9kRDZTkY0HH5w3VjlEST SkDltklkG0LnMyk37hdCp5JJnAgShQe7qlqHPvhApLR08a0Am8vb+eVeBgYnG+hrB44H gGdqYDD40O21hnJFga14tV9LmmvMoDyUpnj0cLspHKa32Ko6OyPIKxMpYnQvx8Ick/5N ahDDifdJV0rM2fQXSSHB13IvY8f1NqO4jrd3gbSHrCLXrQQAoSl9AVjVwNFUgtYfQ2Nv /dQA== X-Gm-Message-State: ALoCoQmJG7Gi/hNLHXMWz/o9SVAyKcriyKbervNuIwsjUJG4JnfauMyLRm31V9pZz3zBCoH6J5L4 X-Received: by 10.180.189.139 with SMTP id gi11mr29635052wic.53.1396451873121; Wed, 02 Apr 2014 08:17:53 -0700 (PDT) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH] elf/dl-lookup.c: Remove obsolete comment about nested function Date: Wed, 2 Apr 2014 16:17:46 +0100 Message-Id: <1396451866-21364-1-git-send-email-will.newton@linaro.org> X-DH-Original-To: glibc@patchwork.siddhesh.in 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 * elf/dl-lookup.c (do_lookup_x): Remove comment referring to nested function and move variable declarations down to before first use. --- 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]);