From patchwork Fri Apr 11 15:29:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 28286 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 845092100C for ; Fri, 11 Apr 2014 15:30:11 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id c41sf17843673yho.5 for ; Fri, 11 Apr 2014 08:30:11 -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:in-reply-to:references:x-original-sender :x-original-authentication-results; bh=9jBhRePgXMhB4Jj9dNl912EH/jDXv4coYAuljMJk3Bk=; b=Rkcsy5fcGvf+P2jBUdXSCUEgXZNJ+/uZrb/oc/vQbDxvsEuHXyCU3ySjDN2K4D5Nc5 GDzYuu7er4GECd8m9KW8i/8vyp+0KlfzNtSOeGf5Hi7zlVf1sySS3nIeuqkU6wc8DtEi QIpz/sfjwqgrpl+saFj6Rg52QLPoKQGAXFIiYXYdfYkaIQ0Q7RcKqrO/Dc3TyS7kQPhW gZeC5TsEcl/vf5bwWyMS+DkOthsxSbCo6Vko1hj7eie1jasudCJ4lqrbXWZ7FZJoOjNG 3oE19wYUsL6vNkdCvT9JsMrgcImYkFRjBMCbz4m18WlLatBbecsfX8hR49XVTQ4mpowO mVOw== X-Gm-Message-State: ALoCoQkBY0MaVJaPw11GeuijAM5wjpVhGlkarfykPJlcq7Cvbklm/9B5J8/qB7bpRI2VWBtNXBk5 X-Received: by 10.58.155.3 with SMTP id vs3mr12102884veb.16.1397230211053; Fri, 11 Apr 2014 08:30:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.229 with SMTP id o92ls1662919qge.95.gmail; Fri, 11 Apr 2014 08:30:10 -0700 (PDT) X-Received: by 10.58.74.38 with SMTP id q6mr19845440vev.7.1397230210953; Fri, 11 Apr 2014 08:30:10 -0700 (PDT) Received: from mail-vc0-x231.google.com (mail-vc0-x231.google.com [2607:f8b0:400c:c03::231]) by mx.google.com with ESMTPS id od9si1387701vcb.173.2014.04.11.08.30.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Apr 2014 08:30:10 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::231 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::231; Received: by mail-vc0-f177.google.com with SMTP id if17so4813934vcb.36 for ; Fri, 11 Apr 2014 08:30:10 -0700 (PDT) X-Received: by 10.220.106.84 with SMTP id w20mr20524618vco.18.1397230210857; Fri, 11 Apr 2014 08:30:10 -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.221.72 with SMTP id ib8csp65441vcb; Fri, 11 Apr 2014 08:30:10 -0700 (PDT) X-Received: by 10.66.177.168 with SMTP id cr8mr28436300pac.128.1397230209865; Fri, 11 Apr 2014 08:30:09 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id eg2si4449739pac.387.2014.04.11.08.30.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Apr 2014 08:30:09 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-48974-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 2031 invoked by alias); 11 Apr 2014 15:30: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 2009 invoked by uid 89); 11 Apr 2014 15:29:59 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f180.google.com X-Received: by 10.180.106.134 with SMTP id gu6mr3935310wib.61.1397230194842; Fri, 11 Apr 2014 08:29:54 -0700 (PDT) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH 2/3] elf/dl-lookup.c: Remove unnecessary static variable Date: Fri, 11 Apr 2014 16:29:47 +0100 Message-Id: <1397230188-14581-2-git-send-email-will.newton@linaro.org> In-Reply-To: <1397230188-14581-1-git-send-email-will.newton@linaro.org> References: <1397230188-14581-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::231 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 undefined_msg is only used once contrary to the comment. ChangeLog: 2014-04-04 Will Newton * elf/dl-lookup.c (undefined_msg): Remove variable. (_dl_lookup_symbol_x): Replace undefined_msg with string literal. --- elf/dl-lookup.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 896e1d2..1c6ca89 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -39,9 +39,6 @@ #define VERSTAG(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag)) -/* We need this string more than once. */ -static const char undefined_msg[] = "undefined symbol: "; - struct sym_val { @@ -817,7 +814,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, /* XXX We cannot translate the message. */ _dl_signal_cerror (0, DSO_FILENAME (reference_name), N_("symbol lookup error"), - make_string (undefined_msg, undef_name, + make_string ("undefined symbol: ", undef_name, versionstr, versionname)); } *ref = NULL;