From: Nick Clifton Date: Fri, 22 Nov 2019 13:12:01 +0000 (+0000) Subject: Replace unnecessary null check with a cast. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b72636deaf8eaf4d31ab9e7cb1047c92fe458172;p=binutils-gdb.git Replace unnecessary null check with a cast. * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Use cast instead of extra check. --- 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)