From 92917cd25103569ad8992dbc5b4dc2dcacfdda7f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 13 Dec 2018 18:58:07 +0100 Subject: [PATCH] vl: Use error_fatal to simplify obvious fatal errors (again) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch created mechanically by rerunning: $ spatch --in-place --sp-file scripts/coccinelle/use-error_fatal.cocci \ --macro-file scripts/cocci-macro-file.h vl.c Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20181213175807.12039-1-armbru@redhat.com> Signed-off-by: Laurent Vivier --- vl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index 2a8b2ee16d..530fad6a71 100644 --- a/vl.c +++ b/vl.c @@ -3133,11 +3133,8 @@ int main(int argc, char **argv, char **envp) Visitor *v; BlockdevOptions_queue *bdo; - v = qobject_input_visitor_new_str(optarg, "driver", &err); - if (!v) { - error_report_err(err); - exit(1); - } + v = qobject_input_visitor_new_str(optarg, "driver", + &error_fatal); bdo = g_new(BlockdevOptions_queue, 1); visit_type_BlockdevOptions(v, NULL, &bdo->bdo, -- GitLab