diff options
author | Juan Quintela <quintela@redhat.com> | 2017-03-22 17:36:57 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2017-04-21 12:25:40 +0200 |
commit | fab350052698e27a1011d0d6f4257d8fecb84867 (patch) | |
tree | 65b5faeabc6ac723d55e0fc264c2786a1a9205b2 /migration | |
parent | 352b0de982f9d764661b5ab9c57951537ae7ac5c (diff) |
migration: Remove MigrationState parameter from migration_is_idle()
Only user don't have a MigrationState handly.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/migration/migration.c b/migration/migration.c index 156daf976f..a92d7f7ce2 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1075,11 +1075,9 @@ bool migration_in_postcopy_after_devices(MigrationState *s) return migration_in_postcopy() && s->postcopy_after_devices; } -bool migration_is_idle(MigrationState *s) +bool migration_is_idle(void) { - if (!s) { - s = migrate_get_current(); - } + MigrationState *s = migrate_get_current(); switch (s->state) { case MIGRATION_STATUS_NONE: @@ -1144,7 +1142,7 @@ int migrate_add_blocker(Error *reason, Error **errp) return -EACCES; } - if (migration_is_idle(NULL)) { + if (migration_is_idle()) { migration_blockers = g_slist_prepend(migration_blockers, reason); return 0; } |