From f9734d5d4078f17daf328b9e113aaffe3d00ecaf Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 20 Jul 2021 14:53:53 +0200 Subject: error: Use error_fatal to simplify obvious fatal errors (again) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We did this with scripts/coccinelle/use-error_fatal.cocci before, in commit 50beeb68094 and 007b06578ab. This commit cleans up rarer variations that don't seem worth matching with Coccinelle. Cc: Thomas Huth Cc: Cornelia Huck Cc: Peter Xu Cc: Juan Quintela Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: Marc-André Lureau Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Signed-off-by: Markus Armbruster Message-Id: <20210720125408.387910-2-armbru@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Peter Xu Acked-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé --- migration/migration.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'migration') diff --git a/migration/migration.c b/migration/migration.c index 041b845..b169943 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -188,8 +188,6 @@ static gint page_request_addr_cmp(gconstpointer ap, gconstpointer bp) void migration_object_init(void) { - Error *err = NULL; - /* This can only be called once. */ assert(!current_migration); current_migration = MIGRATION_OBJ(object_new(TYPE_MIGRATION)); @@ -210,10 +208,7 @@ void migration_object_init(void) qemu_mutex_init(¤t_incoming->page_request_mutex); current_incoming->page_requested = g_tree_new(page_request_addr_cmp); - if (!migration_object_check(current_migration, &err)) { - error_report_err(err); - exit(1); - } + migration_object_check(current_migration, &error_fatal); blk_mig_init(); ram_mig_init(); -- cgit v1.1