diff options
author | Lukas Venhoda <lvenhoda@redhat.com> | 2015-06-18 19:50:28 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-07-02 13:31:28 +0200 |
commit | c04d4d55bc3373f42c70e7395cfdbd09e3d4c0d5 (patch) | |
tree | 5fc40ccff3ffd5f0a4dfacf75225a57d611a5131 /common | |
parent | dcebede0ca3d012786b9ab8fd95961c637b0b4a7 (diff) |
ppc: Fix quic decode endianess
Converts all decoded words in quic from little endian to local
machine endianness.
Diffstat (limited to 'common')
-rw-r--r-- | common/quic.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/common/quic.c b/common/quic.c index 16290d4..bbd0206 100644 --- a/common/quic.c +++ b/common/quic.c @@ -23,6 +23,8 @@ #include <config.h> #endif +#include <glib.h> + #include "quic.h" #include "spice_common.h" #include "bitops.h" @@ -476,7 +478,7 @@ static inline void flush(Encoder *encoder) static void __read_io_word(Encoder *encoder) { more_io_words(encoder); - encoder->io_next_word = *(encoder->io_now++); + encoder->io_next_word = GUINT32_FROM_LE(*(encoder->io_now++)); } static void (*__read_io_word_ptr)(Encoder *encoder) = __read_io_word; @@ -489,7 +491,7 @@ static inline void read_io_word(Encoder *encoder) return; } spice_assert(encoder->io_now < encoder->io_end); - encoder->io_next_word = *(encoder->io_now++); + encoder->io_next_word = GUINT32_FROM_LE(*(encoder->io_now++)); } static inline void decode_eatbits(Encoder *encoder, int len) @@ -763,7 +765,7 @@ static inline unsigned int decode_run(Encoder *encoder) static inline void init_decode_io(Encoder *encoder) { - encoder->io_next_word = encoder->io_word = *(encoder->io_now++); + encoder->io_next_word = encoder->io_word = GUINT32_FROM_LE(*(encoder->io_now++)); encoder->io_available_bits = 0; } |