aboutsummaryrefslogtreecommitdiff
path: root/stubs/vmstate.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2019-10-16 10:29:31 +0800
committerJuan Quintela <quintela@redhat.com>2020-01-20 09:10:23 +0100
commit93062e23619e057743757ee53bf7f8e07f7a3710 (patch)
tree2752391fd9ee253d28a9c5f921a50b94ada4aee6 /stubs/vmstate.c
parent1df2c9a26fcb2fa32d099f8e9adcdae4207872e3 (diff)
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>
Diffstat (limited to 'stubs/vmstate.c')
-rw-r--r--stubs/vmstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stubs/vmstate.c b/stubs/vmstate.c
index 6951d9fdc5..cc4fe41dfc 100644
--- a/stubs/vmstate.c
+++ b/stubs/vmstate.c
@@ -4,7 +4,7 @@
const VMStateDescription vmstate_dummy = {};
int vmstate_register_with_alias_id(VMStateIf *obj,
- int instance_id,
+ uint32_t instance_id,
const VMStateDescription *vmsd,
void *base, int alias_id,
int required_for_version,