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: 27633 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7366920341 for ; Wed, 2 Apr 2014 15:18:12 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id j17sf1631774oag.10 for ; Wed, 02 Apr 2014 08:18:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=SSYFohpxswX/inaf9n6iAoVw9c7KDVJ3gKkTZSkNU8c=; b=mdoowou/tudFeJMnFZAHXR9B46hhK0zGAb4RAn7JtvaIoOnUMo97d3R7PYUkAxKtjM CEJ2C57DzOZHiOJE+WMvDymPJSgo/z11ZgcM7jTZ4RwpMa0JnnZhfX2uR96I+ZHnbGNC xc9/BPPWAaQbHQVQo40gbkmIt1e19Zj8D6W5etVK0EQtGQiiP5PbiMnV8RSMm8BWr16G y39HJxZzNOP3HLlhj+/YCvQ5LbldgbTq0/69892IboIYUyram4mc2xjCCP56W3ynJOjD 0QbwhHlQLVpeLa1K8aB0M9YhX/lhUt1q3d1RrEQG+E+IlHuyd0stM7WqUwPMCCk92HtS AVeA== X-Gm-Message-State: ALoCoQmQDQSFc+oSakemca9c5yQkq/7d4GTGuKgKm92+AFqkQ3ls743nEgXR1cFmy+GByQXrDKsT X-Received: by 10.182.108.136 with SMTP id hk8mr355342obb.11.1396451892014; Wed, 02 Apr 2014 08:18:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.137 with SMTP id j9ls363139qgd.70.gmail; Wed, 02 Apr 2014 08:18:11 -0700 (PDT) X-Received: by 10.52.101.161 with SMTP id fh1mr53569vdb.95.1396451891911; Wed, 02 Apr 2014 08:18:11 -0700 (PDT) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [2607:f8b0:400c:c03::22e]) by mx.google.com with ESMTPS id k20si599726vcm.205.2014.04.02.08.18.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Apr 2014 08:18:11 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c03::22e; Received: by mail-vc0-f174.google.com with SMTP id ld13so509975vcb.19 for ; Wed, 02 Apr 2014 08:18:11 -0700 (PDT) X-Received: by 10.53.1.69 with SMTP id be5mr1096355vdd.27.1396451891825; Wed, 02 Apr 2014 08:18:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp332113vcv; Wed, 2 Apr 2014 08:18:11 -0700 (PDT) X-Received: by 10.68.103.165 with SMTP id fx5mr779987pbb.118.1396451891123; Wed, 02 Apr 2014 08:18:11 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id f8si1427030pbc.415.2014.04.02.08.18.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Apr 2014 08:18:11 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-48801-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 23856 invoked by alias); 2 Apr 2014 15:18:00 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 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-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-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c03::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 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]);