diff options
author | Matthieu Longo <matthieu.longo@arm.com> | 2024-11-28 15:36:51 +0000 |
---|---|---|
committer | Matthieu Longo <matthieu.longo@arm.com> | 2024-12-02 15:18:40 +0000 |
commit | b4377af729850cfda7b59d4349428af2f0bf8cdb (patch) | |
tree | 59621236c5cc402c6aa270df041d3f6fe9c9bf2e | |
parent | aa993e9731bff2033633f034d2e37c74d00d17f3 (diff) | |
download | binutils-b4377af729850cfda7b59d4349428af2f0bf8cdb.zip binutils-b4377af729850cfda7b59d4349428af2f0bf8cdb.tar.gz binutils-b4377af729850cfda7b59d4349428af2f0bf8cdb.tar.bz2 |
aarch64: simplify condition in elfNN_aarch64_merge_gnu_properties
The current condition used to check if a GNU feature property is set
on an input object before the merge is a bit confusing.
(aprop && !<something about aprop>) || !aprop
It seems easier to understand if it is changed as follows:
(!aprop || !<something about aprop>)
-rw-r--r-- | bfd/elfnn-aarch64.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 0350325..ba58349 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -10651,11 +10651,9 @@ elfNN_aarch64_merge_gnu_properties (struct bfd_link_info *info, if ((prop & GNU_PROPERTY_AARCH64_FEATURE_1_BTI) && (bti_report != MARKING_NONE)) { - if ((aprop && !(aprop->u.number & GNU_PROPERTY_AARCH64_FEATURE_1_BTI)) - || !aprop) + if (!aprop || !(aprop->u.number & GNU_PROPERTY_AARCH64_FEATURE_1_BTI)) _bfd_aarch64_elf_check_bti_report (bti_report, abfd); - if ((bprop && !(bprop->u.number & GNU_PROPERTY_AARCH64_FEATURE_1_BTI)) - || !bprop) + if (!bprop || !(bprop->u.number & GNU_PROPERTY_AARCH64_FEATURE_1_BTI)) _bfd_aarch64_elf_check_bti_report (bti_report, bbfd); } } |