ACK.

On Mon, Jun 29, 2015 at 02:58:26PM +0200, Lukas Venhoda wrote:
> Runtime conversion from a string to uint32 is storing the magic with the same
> endianness on both LE and BE machines. This requires aditional byte swap
> when sending magic between LE/BE machines.
> 
> Changing quic magic to a constant will ensure, that it will be always stored 
> in
> native endianness, and the second byte swap won't be needed.
> ---
> Changes since v1:
>  - Improved commit log
> ---
>  common/quic.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/common/quic.c b/common/quic.c
> index 16290d4..498b9cc 100644
> --- a/common/quic.c
> +++ b/common/quic.c
> @@ -35,7 +35,8 @@
>  //#define RLE_PRED_3
>  #define QUIC_RGB
> 
> -#define QUIC_MAGIC (*(uint32_t *)"QUIC")
> +/* ASCII "QUIC" */
> +#define QUIC_MAGIC 0x43495551
>  #define QUIC_VERSION_MAJOR 0U
>  #define QUIC_VERSION_MINOR 1U
>  #define QUIC_VERSION ((QUIC_VERSION_MAJOR << 16) | (QUIC_VERSION_MAJOR & 
> 0xffff))
> --
> 2.4.3
> 
> _______________________________________________
> Spice-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: pgpcHrJEqidrE.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to