aboutsummaryrefslogtreecommitdiff
path: root/migration/vmstate.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-09-21 14:13:07 +0200
committerMarkus Armbruster <armbru@redhat.com>2023-09-29 08:13:57 +0200
commit7f3de3f02f0bd0eaa3ba4506f9a60c1c35865e93 (patch)
tree86a00b7085adafe28acc08f9de52de96c93711c5 /migration/vmstate.c
parentbbde656263d80429b51017b077d9b4064ba13b01 (diff)
migration: Clean up local variable shadowing
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com> Message-ID: <20230921121312.1301864-3-armbru@redhat.com>
Diffstat (limited to 'migration/vmstate.c')
-rw-r--r--migration/vmstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/vmstate.c b/migration/vmstate.c
index 31842c3afb..438ea77cfa 100644
--- a/migration/vmstate.c
+++ b/migration/vmstate.c
@@ -97,7 +97,7 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
return -EINVAL;
}
if (vmsd->pre_load) {
- int ret = vmsd->pre_load(opaque);
+ ret = vmsd->pre_load(opaque);
if (ret) {
return ret;
}