|
From: | Richard Henderson |
Subject: | Re: [Qemu-block] [PATCH v4 1/9] util: Add UUID API |
Date: | Thu, 11 Aug 2016 23:21:28 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 08/11/2016 05:50 AM, Fam Zheng wrote:
+void qemu_uuid_bswap(QemuUUID *uuid) +{ + bswap32s((uint32_t *)&uuid->data[0]); + bswap16s((uint16_t *)&uuid->data[4]); + bswap16s((uint16_t *)&uuid->data[6]); +}
You have alignment problems here too. Perhaps you really did want to add uint32_t (and uint16_t?) as union members to QemuUUID.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |