migration: not necessary to check ops again
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · * Wei Yang ([email protected]) wrote:
During each iteration,
se->opsis checked before each loop. So it is not necessary to check it again and simplify the following check a little.Signed-off-by Wei Yang <[email protected]>
Queued
Quoted 34 lines
--- migration/savevm.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)migration/savevm.c +6
-8@@ -1157,15 +1157,13 @@ int qemu_savevm_state_iterate(QEMUFile *f, bool postcopy)if (!se->ops || !se->ops->save_live_iterate) {continue ; } -if (se->ops && se->ops->is_active) { -if (!se->ops->is_active (se->opaque)) { -continue ; - } +if (se->ops->is_active && + !se->ops->is_active (se->opaque)) { +continue ; } -if (se->ops && se->ops->is_active_iterate) { -if (!se->ops->is_active_iterate (se->opaque)) { -continue ; - } +if (se->ops->is_active_iterate && + !se->ops->is_active_iterate (se->opaque)) { +continue ; }/* * In the postcopy phase, any device that doesn't know how to Signature · 1 line
2.19.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK