diff options
author | Markus Armbruster <armbru@redhat.com> | 2023-09-21 14:13:07 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2023-09-29 08:13:57 +0200 |
commit | 7f3de3f02f0bd0eaa3ba4506f9a60c1c35865e93 (patch) | |
tree | 86a00b7085adafe28acc08f9de52de96c93711c5 /migration/block.c | |
parent | bbde656263d80429b51017b077d9b4064ba13b01 (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/block.c')
-rw-r--r-- | migration/block.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/block.c b/migration/block.c index 86c2256a2b..eb6aafeb9e 100644 --- a/migration/block.c +++ b/migration/block.c @@ -440,8 +440,8 @@ static int init_blk_migration(QEMUFile *f) /* Can only insert new BDSes now because doing so while iterating block * devices may end up in a deadlock (iterating the new BDSes, too). */ for (i = 0; i < num_bs; i++) { - BlkMigDevState *bmds = bmds_bs[i].bmds; - BlockDriverState *bs = bmds_bs[i].bs; + bmds = bmds_bs[i].bmds; + bs = bmds_bs[i].bs; if (bmds) { ret = blk_insert_bs(bmds->blk, bs, &local_err); |