[Spice-devel] [PATCH spice-server 02/10] lz4-encoder: Use GUINT32_TO_BE instead of htonl

Frediano Ziglio fziglio at redhat.com
Mon Jan 22 17:54:54 UTC 2018


Just a style change, almost of the code use similar macros for such
tasks.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/lz4-encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lz4-encoder.c b/server/lz4-encoder.c
index 39aac012..a8f0d17c 100644
--- a/server/lz4-encoder.c
+++ b/server/lz4-encoder.c
@@ -89,7 +89,7 @@ int lz4_encode(Lz4EncoderContext *lz4, int height, int stride, uint8_t *io_ptr,
             LZ4_freeStream(stream);
             return 0;
         }
-        *((uint32_t *)compressed_lines) = htonl(enc_size);
+        *((uint32_t *)compressed_lines) = GUINT32_TO_BE(enc_size);
 
         out_size += enc_size += 4;
         already_copied = 0;
-- 
2.14.3



More information about the Spice-devel mailing list