[Spice-devel] [spice-common PATCH 1/3] ppc: Fix lz magic endianess
Christophe Fergeau
cfergeau at redhat.com
Fri Jun 19 02:34:39 PDT 2015
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150619/df281a98/attachment.sig>
More information about the Spice-devel
mailing list