summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorLukas Venhoda <lvenhoda@redhat.com>2015-06-29 14:58:26 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2015-07-02 13:31:28 +0200
commit6183bbde2470cbf2c212d00d1c4b782f23dcd638 (patch)
tree103ba6f5e15ed129b97e6bc7515b8ea5038c9bcd /common
parent5a7e5876e6ec718b4288850ea7f94dcd55bdf92c (diff)
ppc: Fix quic magic endianess
Runtime conversion from a string to uint32 is storing the magic with the same endianness on both LE and BE machines. This requires aditional byte swap when sending magic between LE/BE machines. Changing quic magic to a constant will ensure, that it will be always stored in native endianness, and the second byte swap won't be needed.
Diffstat (limited to 'common')
-rw-r--r--common/quic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/quic.c b/common/quic.c
index bbd0206..a9bd215 100644
--- a/common/quic.c
+++ b/common/quic.c
@@ -37,7 +37,8 @@
//#define RLE_PRED_3
#define QUIC_RGB
-#define QUIC_MAGIC (*(uint32_t *)"QUIC")
+/* ASCII "QUIC" */
+#define QUIC_MAGIC 0x43495551
#define QUIC_VERSION_MAJOR 0U
#define QUIC_VERSION_MINOR 1U
#define QUIC_VERSION ((QUIC_VERSION_MAJOR << 16) | (QUIC_VERSION_MAJOR & 0xffff))