From e40fa987e40c78a10263ee928b0c278778dbc01c Mon Sep 17 00:00:00 2001 From: danra Date: Fri, 25 Aug 2017 19:23:02 +0300 Subject: Simplify bswap_16 implementation Simplify bswap_16 implementation on platforms which don't already have it defined. This has no effect on the generated assembly; it just simplifies the source code. --- src/compat/byteswap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compat/byteswap.h b/src/compat/byteswap.h index 3c5a5c0837..d93ff7413a 100644 --- a/src/compat/byteswap.h +++ b/src/compat/byteswap.h @@ -35,7 +35,7 @@ #if HAVE_DECL_BSWAP_16 == 0 inline uint16_t bswap_16(uint16_t x) { - return (x >> 8) | ((x & 0x00ff) << 8); + return (x >> 8) | (x << 8); } #endif // HAVE_DECL_BSWAP16 -- cgit v1.2.3