[Spice-devel] [PATCH spice-gtk] util: replace SPICE_BYTESWAP16 with GUINT16_SWAP_LE_BE
marcandre.lureau at redhat.com
marcandre.lureau at redhat.com
Thu Jun 15 11:47:32 UTC 2017
From: Marc-André Lureau <marcandre.lureau at redhat.com>
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 at redhat.com>
---
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
More information about the Spice-devel
mailing list