[PATCH spice-server] glz-encoder: Avoid double byte swap sending image magic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



encode_32 already deals with endian, don't swap twice.
Tested with a ppc64 server machine and a x64 client.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/glz-encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/glz-encoder.c b/server/glz-encoder.c
index dba2cd12..3ad2b97c 100644
--- a/server/glz-encoder.c
+++ b/server/glz-encoder.c
@@ -262,7 +262,7 @@ int glz_encode(GlzEncoderContext *opaque_encoder,
     encoder->cur_image.id = dict_image->id;
     encoder->cur_image.first_win_seg = dict_image->first_seg;
 
-    encode_32(encoder, GUINT32_TO_LE(LZ_MAGIC));
+    encode_32(encoder, LZ_MAGIC);
     encode_32(encoder, LZ_VERSION);
     if (top_down) {
         encode(encoder, (type & LZ_IMAGE_TYPE_MASK) | (1 << LZ_IMAGE_TYPE_LOG));
-- 
2.17.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]