aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--debug/pcprofiledump.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 00255b7..d148e74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-05 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #22086]
+ * debug/pcprofiledump.c (main): Use byte-swapped mask when
+ comparing word with byte-swapped constant.
+
2017-09-05 Chris Leonard <cjlhomeaddress@gmail.com>
[BZ #20498]
diff --git a/debug/pcprofiledump.c b/debug/pcprofiledump.c
index a32cdef..6a9641e 100644
--- a/debug/pcprofiledump.c
+++ b/debug/pcprofiledump.c
@@ -115,7 +115,7 @@ main (int argc, char *argv[])
error (EXIT_FAILURE, errno, _("cannot read header"));
/* Check whether we have to swap the byte order. */
- int must_swap = (word & 0xfffffff0) == bswap_32 (0xdeb00000);
+ int must_swap = (word & 0x0fffffff) == bswap_32 (0xdeb00000);
if (must_swap)
word = bswap_32 (word);