aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-08-28 09:41:37 +0200
committerWladimir J. van der Laan <[email protected]>2017-08-28 09:41:57 +0200
commit298251161c7b637157885420b35d7601e072923b (patch)
treea5d418b8b1ac2c806296730c07fa5c7bdd6e9a6e /src
parentMerge #11131: rpc: Write authcookie atomically (diff)
parentSimplify bswap_16 implementation (diff)
downloaddiscoin-298251161c7b637157885420b35d7601e072923b.tar.xz
discoin-298251161c7b637157885420b35d7601e072923b.zip
Merge #11138: Compat: Simplify bswap_16 implementation
e40fa98 Simplify bswap_16 implementation (danra) Pull request description: 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. Tree-SHA512: 1c6ac1d187a2751da75256d12b6b890160d15246dd2c2b6a56748ec43482e3a5a3323be2910f07b42d3dc243a568c7412c26eaa036efec764436e988abd1c3f1
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