KnoooW / naclports

Automatically exported from code.google.com/p/naclports
0 stars 0 forks source link

__byte_swap_32 "((x && 0xff) << 24)" typo? #137

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
glibc-compat/include/machine/endian.h:

#define __byte_swap_32(x) \
        (((x && 0xff) << 24) | \  // !!!! typo? should be "x & 0xff)
         (((x) << 8) & 0x00ff0000) | \
         (((x) >> 8) & 0x0000ff00) | \
         ((x) >> 24) )

What version of the product are you using? On what operating system?
glibc-compat 0.1

Please provide any additional information below.

Original issue reported on code.google.com by ImSk...@gmail.com on 29 Aug 2014 at 12:37

GoogleCodeExporter commented 9 years ago
Thanks for tracking that down.  Fix is in progress: 
https://codereview.chromium.org/617603002

Original comment by sbc@google.com on 29 Sep 2014 at 11:07

GoogleCodeExporter commented 9 years ago

Original comment by sbc@google.com on 30 Sep 2014 at 1:03