From 2594f56d4c7ef621da5d0c21921f8fda32025623 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 27 Apr 2016 11:05:14 +0100 Subject: migration: don't use an array for storing migrate parameters The MigrateState struct uses an array for storing migration parameters. This presumes that all future parameters will be integers too, which is not going to be the case. There is no functional reason why an array is used, if anything it makes the code less clear. The QAPI schema already defines a struct - MigrationParameters - capable of storing all the individual parameters, so just use that instead of an array. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange Message-Id: <1461751518-12128-25-git-send-email-berrange@redhat.com> Signed-off-by: Amit Shah --- include/migration/migration.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/migration/migration.h b/include/migration/migration.h index d24c6ef..74105a1 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -135,9 +135,12 @@ struct MigrationState QemuThread thread; QEMUBH *cleanup_bh; QEMUFile *to_dst_file; - int parameters[MIGRATION_PARAMETER__MAX]; + + /* New style params from 'migrate-set-parameters' */ + MigrationParameters parameters; int state; + /* Old style params from 'migrate' command */ MigrationParams params; /* State related to return path */ -- cgit v1.1