diff options
author | Alan Modra <amodra@gmail.com> | 2019-10-14 20:29:12 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-10-15 16:00:54 +1030 |
commit | ed481f9799f2bd08a7541a5fe0a887dc5c7fd4a9 (patch) | |
tree | 35fb1ae9da0260f6ae763809a43e32e46f23e234 /bfd/bfd.c | |
parent | b7be2d03fb2f873e0db74c84846df97787fc0dc6 (diff) | |
download | gdb-ed481f9799f2bd08a7541a5fe0a887dc5c7fd4a9.zip gdb-ed481f9799f2bd08a7541a5fe0a887dc5c7fd4a9.tar.gz gdb-ed481f9799f2bd08a7541a5fe0a887dc5c7fd4a9.tar.bz2 |
Simplify power of two test
* bfd.c (bfd_check_compression_header): Check for powers of two
with x == (x & -x).
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r-- | bfd/bfd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2635,7 +2635,7 @@ bfd_check_compression_header (bfd *abfd, bfd_byte *contents, chdr.ch_addralign = bfd_get_64 (abfd, &echdr->ch_addralign); } if (chdr.ch_type == ELFCOMPRESS_ZLIB - && chdr.ch_addralign == (1U << bfd_log2 (chdr.ch_addralign))) + && chdr.ch_addralign == (chdr.ch_addralign & -chdr.ch_addralign)) { *uncompressed_size = chdr.ch_size; *uncompressed_alignment_power = bfd_log2 (chdr.ch_addralign); |