diff options
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 a7a76a0fb9..e0628d187f 100644 --- a/migration/block.c +++ b/migration/block.c @@ -383,7 +383,7 @@ static void init_blk_migration(QEMUFile *f) BlockDriverState *bs; BlkMigDevState *bmds; int64_t sectors; - BdrvNextIterator *it = NULL; + BdrvNextIterator it; block_mig_state.submitted = 0; block_mig_state.read_done = 0; @@ -394,7 +394,7 @@ static void init_blk_migration(QEMUFile *f) block_mig_state.zero_blocks = migrate_zero_blocks(); - while ((it = bdrv_next(it, &bs))) { + for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) { if (bdrv_is_read_only(bs)) { continue; } |