From a8ee07e0d13feca990de307e2eccdac42b5a21f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Wed, 13 Nov 2019 10:26:37 +0100 Subject: [PATCH] qemu: use GUINT32_SWAP_LE_BE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use this GLib macro instead of bswap_32 from gnulib. Signed-off-by: Ján Tomko Reviewed-by: Peter Krempa --- src/qemu/qemu_driver.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c1b404adfa..159a6dc464 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "qemu_driver.h" @@ -2803,11 +2802,11 @@ struct _virQEMUSaveData { static inline void bswap_header(virQEMUSaveHeaderPtr hdr) { - hdr->version = bswap_32(hdr->version); - hdr->data_len = bswap_32(hdr->data_len); - hdr->was_running = bswap_32(hdr->was_running); - hdr->compressed = bswap_32(hdr->compressed); - hdr->cookieOffset = bswap_32(hdr->cookieOffset); + hdr->version = GUINT32_SWAP_LE_BE(hdr->version); + hdr->data_len = GUINT32_SWAP_LE_BE(hdr->data_len); + hdr->was_running = GUINT32_SWAP_LE_BE(hdr->was_running); + hdr->compressed = GUINT32_SWAP_LE_BE(hdr->compressed); + hdr->cookieOffset = GUINT32_SWAP_LE_BE(hdr->cookieOffset); }