diff options
author | Juan Quintela <quintela@redhat.com> | 2017-10-06 23:03:55 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2017-10-29 14:06:15 +0100 |
commit | c9dede2d482676440cb6e826ebe87450965fe679 (patch) | |
tree | 86b079eea920e73c6b068e506ebbcd98f3515380 /migration/migration.c | |
parent | 2a313e5cf6ed90b932b0abe2b4f2055785397f93 (diff) |
migration: No need to return the size of the cache
After the previous commits, we make sure that the value passed is
right, or we just drop an error. So now we return if there is one
error or we have setup correctly the value passed.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
--
Improve error messasge
Return 0 always for success
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/migration/migration.c b/migration/migration.c index 62761d5705..6bbd4715d3 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1406,14 +1406,12 @@ void qmp_migrate_continue(MigrationStatus state, Error **errp) void qmp_migrate_set_cache_size(int64_t value, Error **errp) { MigrationState *s = migrate_get_current(); - int64_t new_size; - new_size = xbzrle_cache_resize(value, errp); - if (new_size < 0) { + if (xbzrle_cache_resize(value, errp) < 0) { return; } - s->xbzrle_cache_size = new_size; + s->xbzrle_cache_size = value; } int64_t qmp_query_migrate_cache_size(Error **errp) |