migration: Simplify initial conditionals in migration for better readability
authorHet Gala <het.gala@nutanix.com>
Tue, 5 Dec 2023 08:00:39 +0000 (08:00 +0000)
committerPeter Xu <peterx@redhat.com>
Tue, 16 Jan 2024 03:16:09 +0000 (11:16 +0800)
commit0770ad438d95f4b9636a99b522b6e5e6af724578
tree106c4d196abbe58e8e8b63f606ae926b55344cc1
parent977542ded7e6b28d2bc077bcda24568c716e393c
migration: Simplify initial conditionals in migration for better readability

The inital conditional statements in qmp migration functions is harder
to understand than necessary. It is better to get all errors out of
the way in the beginning itself to have better readability and error
handling.

Signed-off-by: Het Gala <het.gala@nutanix.com>
Suggested-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20231205080039.197615-1-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>
migration/migration.c