From b72636deaf8eaf4d31ab9e7cb1047c92fe458172 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 22 Nov 2019 13:12:01 +0000 Subject: [PATCH] Replace unnecessary null check with a cast. * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Use cast instead of extra check. --- ld/ChangeLog | 5 +++++ ld/ldlang.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 5a3b2ddd1ca..43d858b5f5c 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2019-11-22 Nick Clifton + + * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Use cast instead of + extra check. + 2019-11-21 Nick Clifton * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Check for an empty diff --git a/ld/ldlang.h b/ld/ldlang.h index 3e3e6a02894..24a50992183 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) -- 2.30.2