summaryrefslogtreecommitdiffstats
path: root/common/pixman_utils.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-05-19 16:03:32 +0200
committerAlexander Larsson <alexl@redhat.com>2010-05-19 16:03:32 +0200
commit45e62d5368f055ae1d64008086a7e4721cba0ac3 (patch)
tree476694c5cba13c629d1840e4a64b634f81b30edc /common/pixman_utils.c
parent0b76eae6eba1ee6f88a5228415064b4f9e71efdf (diff)
downloadspice-45e62d5368f055ae1d64008086a7e4721cba0ac3.tar.gz
spice-45e62d5368f055ae1d64008086a7e4721cba0ac3.tar.xz
spice-45e62d5368f055ae1d64008086a7e4721cba0ac3.zip
Use the new byteswap macros from spice-protocol
Diffstat (limited to 'common/pixman_utils.c')
-rw-r--r--common/pixman_utils.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/common/pixman_utils.c b/common/pixman_utils.c
index 4ba0c179..de8706ec 100644
--- a/common/pixman_utils.c
+++ b/common/pixman_utils.c
@@ -1071,14 +1071,8 @@ pixman_image_t *spice_bitmap_try_as_pixman(int src_format,
}
#ifdef WORDS_BIGENDIAN
-#define UINT16_FROM_LE(x) ((uint16_t) ( \
- (uint16_t) ((uint16_t) (x) >> 8) | \
- (uint16_t) ((uint16_t) (x) << 8)))
-#define UINT32_FROM_LE(x) (x) ((uint32_t) ( \
- (((uint32_t) (val) & (uint32_t) 0x000000ffU) << 24) | \
- (((uint32_t) (val) & (uint32_t) 0x0000ff00U) << 8) | \
- (((uint32_t) (val) & (uint32_t) 0x00ff0000U) >> 8) | \
- (((uint32_t) (val) & (uint32_t) 0xff000000U) >> 24)))
+#define UINT16_FROM_LE(x) SPICE_BYTESWAP16(x)
+#define UINT32_FROM_LE(x) SPICE_BYTESWAP32(x)
#else
#define UINT16_FROM_LE(x) (x)
#define UINT32_FROM_LE(x) (x)