[PATCH spice-gtk] util: replace SPICE_BYTESWAP16 with GUINT16_SWAP_LE_BE

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

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

SPICE_BYTESWAP* macros where introduced at a time when spice didn't
depend on glib (that feels quite long ago). Those macros seem to be
copied & adapted from glib.

In any case, that's the only direct user in spice-gtk, we can use the
glib version instead, so one day SPICE_BYTESWAP* could eventually be
removed.

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
 src/spice-util.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/spice-util.c b/src/spice-util.c
index 86377b6..f5a35ed 100644
--- a/src/spice-util.c
+++ b/src/spice-util.c
@@ -23,7 +23,6 @@
 #include <string.h>
 #include <glib.h>
 #include <glib-object.h>
-#include <spice/macros.h>
 #include "spice-util-priv.h"
 #include "spice-util.h"
 #include "spice-util-priv.h"
@@ -275,7 +274,7 @@ guint16 spice_make_scancode(guint scancode, gboolean release)
         scancode |= 0x80;
     if (scancode < 0x100)
         return scancode;
-    return SPICE_BYTESWAP16(0xe000 | (scancode - 0x100));
+    return GUINT16_SWAP_LE_BE(0xe000 | (scancode - 0x100));
 }
 
 typedef enum {
-- 
2.13.1.395.gf7b71de06

_______________________________________________
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]