summaryrefslogtreecommitdiffstats
path: root/polyp/endianmacros.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-02-03 14:36:19 +0000
committerPierre Ossman <ossman@cendio.se>2006-02-03 14:36:19 +0000
commit5c01c1029fc73016184119ce81bb9ae95b3c1f0f (patch)
tree9de7af0a6f4fa00e2f0c3f55042085f5bd9b9612 /polyp/endianmacros.h
parentd431e0094b95f671a9f557887dc4cfbc40a28d10 (diff)
Fix endian conversion macros and reformat them to be a bit more readable.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@474 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/endianmacros.h')
-rw-r--r--polyp/endianmacros.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/polyp/endianmacros.h b/polyp/endianmacros.h
index d07652fb..91489cd3 100644
--- a/polyp/endianmacros.h
+++ b/polyp/endianmacros.h
@@ -28,10 +28,10 @@
#include <config.h>
#endif
-#define INT16_SWAP(x) ((int16_t)(((uint16_t) x >> 8) | ((uint16_t) x << 8)))
-#define UINT16_SWAP(x) ((uint16_t)(((uint16_t) x >> 8) | ((uint16_t) x << 8)))
-#define INT32_SWAP(x) ((int32_t)(((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 16) | (((uint32_t) x) >> 16) & 0xFF00))
-#define UINT32_SWAP(x) ((uint32_t)(((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 16) | ((((uint32_t) x) >> 16) & 0xFF00)))
+#define INT16_SWAP(x) ( (int16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) )
+#define UINT16_SWAP(x) ( (uint16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) )
+#define INT32_SWAP(x) ( (int32_t) ( ((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 8) | ((((uint32_t) x) >> 8) & 0xFF00) ) )
+#define UINT32_SWAP(x) ( (uint32_t) ( ((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 8) | ((((uint32_t) x) >> 8) & 0xFF00) ) )
#ifdef WORDS_BIGENDIAN
#define INT16_FROM_LE(x) INT16_SWAP(x)