try_copy_symbol_type node_class check
authorAlan Modra <amodra@gmail.com>
Sat, 3 Dec 2016 10:24:57 +0000 (20:54 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 3 Dec 2016 10:24:57 +0000 (20:54 +1030)
* ldexp.c (try_copy_symbol_type): Remove unnecessary check.

ld/ChangeLog
ld/ldexp.c

index a4b6949333e8264c78fd28ecd1c40d1fd7410c4b..b86e203895fc4011b75abec1ed8c1143d8a4637d 100644 (file)
@@ -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
index cb5e0935513ffe032e09b9d8badccf81ad410123..c962c5e0f847d770f9b370dac5b94a607aef03f3 100644 (file)
@@ -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