qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/7] Use sizeof(qemu_uuid) instead of literal 16


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 4/7] Use sizeof(qemu_uuid) instead of literal 16
Date: Thu, 06 Jun 2013 21:52:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Laszlo Ersek <address@hidden> writes:

> On 06/06/13 18:27, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>>  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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]