mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
migration: Change SaveStateEntry.instance_id into uint32_t
It was always used as 32bit, so define it as used to be clear. Instead of using -1 as the auto-gen magic value, we switch to UINT32_MAX. We also make sure that we don't auto-gen this value to avoid overflowed instance IDs without being noticed. Suggested-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
1df2c9a26f
commit
93062e2361
5 changed files with 14 additions and 12 deletions
|
@ -268,7 +268,7 @@ static void apic_common_realize(DeviceState *dev, Error **errp)
|
|||
APICCommonState *s = APIC_COMMON(dev);
|
||||
APICCommonClass *info;
|
||||
static DeviceState *vapic;
|
||||
int instance_id = s->id;
|
||||
uint32_t instance_id = s->id;
|
||||
|
||||
info = APIC_COMMON_GET_CLASS(s);
|
||||
info->realize(dev, errp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue