Replace unnecessary null check with a cast.

* ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Use cast instead of
	extra check.
This commit is contained in:
Nick Clifton 2019-11-22 13:12:01 +00:00
parent c90569d301
commit b72636deaf
2 changed files with 6 additions and 1 deletions

View 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

View 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)