aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2019-11-22 13:12:01 +0000
committerNick Clifton <nickc@redhat.com>2019-11-22 13:12:01 +0000
commitb72636deaf8eaf4d31ab9e7cb1047c92fe458172 (patch)
tree430be3a1b8471521c6f5fa6ff395917e5459acc1
parentc90569d301d140df88c795e5b57585c70258f150 (diff)
downloadgdb-b72636deaf8eaf4d31ab9e7cb1047c92fe458172.zip
gdb-b72636deaf8eaf4d31ab9e7cb1047c92fe458172.tar.gz
gdb-b72636deaf8eaf4d31ab9e7cb1047c92fe458172.tar.bz2
Replace unnecessary null check with a cast.
* ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Use cast instead of extra check.
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldlang.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 5a3b2dd..43d858b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-22 Nick Clifton <nickc@redhat.com>
+
+ * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Use cast instead of
+ extra check.
+
2019-11-21 Nick Clifton <nickc@redhat.com>
* ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Check for an empty
diff --git a/ld/ldlang.h b/ld/ldlang.h
index 3e3e6a0..24a5099 100644
--- a/ld/ldlang.h
+++ b/ld/ldlang.h
@@ -574,7 +574,7 @@ extern asection *section_for_dot
#define LANG_FOR_EACH_INPUT_STATEMENT(statement) \
lang_input_statement_type *statement; \
- for (statement = file_chain.head == NULL ? NULL : &file_chain.head->input_statement; \
+ for (statement = (lang_input_statement_type *) file_chain.head; \
statement != NULL; \
statement = statement->next)