diff mbox

[2/3] elf/dl-lookup.c: Remove unnecessary static variable

Message ID 1397230188-14581-2-git-send-email-will.newton@linaro.org
State Accepted
Headers show

Commit Message

Will Newton April 11, 2014, 3:29 p.m. UTC
undefined_msg is only used once contrary to the comment.

ChangeLog:

2014-04-04  Will Newton  <will.newton@linaro.org>

	* 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(-)

Comments

Ondřej Bílka April 11, 2014, 9:16 p.m. UTC | #1
On Fri, Apr 11, 2014 at 04:29:47PM +0100, Will Newton wrote:
> undefined_msg is only used once contrary to the comment.
> 
looks ok.
diff mbox

Patch

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;