Replace unnecessary null check with a cast.
authorNick Clifton <nickc@redhat.com>
Fri, 22 Nov 2019 13:12:01 +0000 (13:12 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 22 Nov 2019 13:12:01 +0000 (13:12 +0000)
* ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Use cast instead of
extra check.

ld/ChangeLog
ld/ldlang.h

index 5a3b2ddd1cac063d5f784cb385809cd2955dbeb6..43d858b5f5ccbee1fc7854a0b5ba2fbd8f1c9331 100644 (file)
@@ -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
index 3e3e6a028940b4f8b6d937773bfa217b0e98787b..24a509921833df41ef53e3e640a897d2d811ad79 100644 (file)
@@ -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)