Re: [spice-common PATCH 1/3] ppc: Fix lz magic endianess

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

 



On Thu, Jun 18, 2015 at 07:50:26PM +0200, Lukas Venhoda wrote:
> Commit d39dfbfe changes to be lz magic always treated as LE when encoded.
> 
> Changing lz magic to constant instead of a runtime coversion from string
> to int is a better way to go. This way lz magic will stay the same on
> both BE and LE machines.

I'm not sure how to read it here, what happens is that encode_32() will
do the byte swapping for us, so we can store the magic in the native
endianness, and let encode_32() do the work instead of having the
constant hard coded to little-endian, and having to double-swap it on
big endian platforms (we byteswap it before passing it to encode_32(),
which is going to byteswap it again, which gives a no-op).

ACK, unless you want to improve the commit log.

Christophe

Attachment: pgpqMhLlsQF7i.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]