summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/endianmacros.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-05-01 04:13:15 +0200
committerLennart Poettering <lennart@poettering.net>2009-05-01 04:13:15 +0200
commit076830af191306e0f6e5c6c783042345fcbca2be (patch)
treeb9ab88bdaf8cef63a6e8b1d2e36332f422ef9638 /src/pulsecore/endianmacros.h
parent947bf5de6c7eaa1edc701f3f959dc16e091082dc (diff)
endian: fix LE/BE order for 24 bit accessor functions
Diffstat (limited to 'src/pulsecore/endianmacros.h')
-rw-r--r--src/pulsecore/endianmacros.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pulsecore/endianmacros.h b/src/pulsecore/endianmacros.h
index 22579376..2b18cf8d 100644
--- a/src/pulsecore/endianmacros.h
+++ b/src/pulsecore/endianmacros.h
@@ -45,27 +45,27 @@
#define PA_UINT32_SWAP(x) ( (uint32_t) ( ((uint32_t) (x) >> 24) | ((uint32_t) (x) << 24) | (((uint32_t) (x) & 0xFF00) << 8) | ((((uint32_t) (x)) >> 8) & 0xFF00) ) )
#endif
-static inline uint32_t PA_READ24LE(const uint8_t *p) {
+static inline uint32_t PA_READ24BE(const uint8_t *p) {
return
((uint32_t) p[0] << 16) |
((uint32_t) p[1] << 8) |
((uint32_t) p[2]);
}
-static inline uint32_t PA_READ24BE(const uint8_t *p) {
+static inline uint32_t PA_READ24LE(const uint8_t *p) {
return
((uint32_t) p[2] << 16) |
((uint32_t) p[1] << 8) |
((uint32_t) p[0]);
}
-static inline void PA_WRITE24LE(uint8_t *p, uint32_t u) {
+static inline void PA_WRITE24BE(uint8_t *p, uint32_t u) {
p[0] = (uint8_t) (u >> 16);
p[1] = (uint8_t) (u >> 8);
p[2] = (uint8_t) u;
}
-static inline void PA_WRITE24BE(uint8_t *p, uint32_t u) {
+static inline void PA_WRITE24LE(uint8_t *p, uint32_t u) {
p[2] = (uint8_t) (u >> 16);
p[1] = (uint8_t) (u >> 8);
p[0] = (uint8_t) u;