From: Marc-AndrĂ© Lureau <[email protected]>

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 <[email protected]>
---
 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to