aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanra <[email protected]>2017-08-25 19:23:02 +0300
committerGitHub <[email protected]>2017-08-25 19:23:02 +0300
commite40fa987e40c78a10263ee928b0c278778dbc01c (patch)
treecb93f87df6b1702d4f0d9e37b43dc0bc68c60be9 /src
parentMerge #11112: [developer-notes] By default, declare single-argument construct... (diff)
downloaddiscoin-e40fa987e40c78a10263ee928b0c278778dbc01c.tar.xz
discoin-e40fa987e40c78a10263ee928b0c278778dbc01c.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/compat/byteswap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compat/byteswap.h b/src/compat/byteswap.h
index 3c5a5c083..d93ff7413 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