diff options
author | Nick Clifton <nickc@redhat.com> | 2019-11-22 13:12:01 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2019-11-22 13:12:01 +0000 |
commit | b72636deaf8eaf4d31ab9e7cb1047c92fe458172 (patch) | |
tree | 430be3a1b8471521c6f5fa6ff395917e5459acc1 /ld | |
parent | c90569d301d140df88c795e5b57585c70258f150 (diff) | |
download | gdb-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.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/ldlang.h | 2 |
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) |