Received: from eggs.gnu.org ([2001:4830:134:3::10]:34823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkgEL-0005BL-G0 for qemu-devel@nongnu.org; Thu, 06 Jun 2013 15:52:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkgEG-0003yG-QF for qemu-devel@nongnu.org; Thu, 06 Jun 2013 15:52:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkgEG-0003y7-IO for qemu-devel@nongnu.org; Thu, 06 Jun 2013 15:52:12 -0400 From: Markus Armbruster References: <1370536046-15125-1-git-send-email-armbru@redhat.com> <1370536046-15125-5-git-send-email-armbru@redhat.com> <51B0D46C.6050609@redhat.com> Date: Thu, 06 Jun 2013 21:52:08 +0200 In-Reply-To: <51B0D46C.6050609@redhat.com> (Laszlo Ersek's message of "Thu, 06 Jun 2013 20:26:52 +0200") Message-ID: <87ip1rrp93.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 4/7] Use sizeof(qemu_uuid) instead of literal 16 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Laszlo Ersek writes: > On 06/06/13 18:27, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> arch_init.c | 3 ++- >> hw/nvram/fw_cfg.c | 2 +- >> include/sysemu/sysemu.h | 2 +- >> 3 files changed, 4 insertions(+), 3 deletions(-) >> >> diff --git a/arch_init.c b/arch_init.c >> index 5d71870..aa24660 100644 >> --- a/arch_init.c >> +++ b/arch_init.c >> @@ -1029,7 +1029,8 @@ int qemu_uuid_parse(const char *str, uint8_t *uuid) >> return -1; >> } >> #ifdef TARGET_I386 >> - smbios_add_field(1, offsetof(struct smbios_type_1, uuid), 16, uuid); >> + smbios_add_field(1, offsetof(struct smbios_type_1, uuid), >> + sizeof(uuid), uuid); >> #endif >> return 0; >> } > > I believe this is wrong, "uuid" is not an array here but a pointer. I > guess you mistyped "sizeof(qemu_uuid)" as "sizeof(uuid)" in the third arg. Rats! You're right. Thanks!