This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] try_copy_symbol_type node_class check


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4193bc588b4e66da0ed502eaef6e7ce85272fb42

commit 4193bc588b4e66da0ed502eaef6e7ce85272fb42
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Dec 3 20:54:57 2016 +1030

    try_copy_symbol_type node_class check
    
    	* ldexp.c (try_copy_symbol_type): Remove unnecessary check.

Diff:
---
 ld/ChangeLog |  4 ++++
 ld/ldexp.c   | 14 +++++---------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index a4b6949..b86e203 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2016-12-03  Alan Modra  <amodra@gmail.com>
+
+	* ldexp.c (try_copy_symbol_type): Remove unnecessary check.
+
 2016-12-02  Nick Clifton  <nickc@redhat.com>
 
 	PR ld/20910
diff --git a/ld/ldexp.c b/ld/ldexp.c
index cb5e093..c962c5e 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -990,16 +990,12 @@ is_align_conditional (const etree_type *tree)
 static void
 try_copy_symbol_type (struct bfd_link_hash_entry *h, etree_type *src)
 {
-  if (src->type.node_class == etree_name)
-    {
-      struct bfd_link_hash_entry *hsrc;
+  struct bfd_link_hash_entry *hsrc;
 
-      hsrc = bfd_link_hash_lookup (link_info.hash, src->name.name,
-				    FALSE, FALSE, TRUE);
-      if (hsrc)
-	bfd_copy_link_hash_symbol_type (link_info.output_bfd, h,
-						    hsrc);
-    }
+  hsrc = bfd_link_hash_lookup (link_info.hash, src->name.name,
+			       FALSE, FALSE, TRUE);
+  if (hsrc != NULL)
+    bfd_copy_link_hash_symbol_type (link_info.output_bfd, h, hsrc);
 }
 
 static void


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]