diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-10-17 10:26:26 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-10-19 14:51:34 +0200 |
commit | 50beeb680949117017343e593dd7323632a6d872 (patch) | |
tree | f31c97c58d73df363f17f6cbf2a874cfa48d6c05 /vl.c | |
parent | 4b5766488fd3549dc47a75331cf4db62f477536c (diff) | |
download | qemu-50beeb680949117017343e593dd7323632a6d872.zip qemu-50beeb680949117017343e593dd7323632a6d872.tar.gz qemu-50beeb680949117017343e593dd7323632a6d872.tar.bz2 |
Use error_fatal to simplify obvious fatal errors (again)
Add a slight improvement of the Coccinelle semantic patch from commit
007b06578ab, and use it to clean up. It leaves dead Error * variables
behind, cleaned up manually.
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Alexander Graf <agraf@suse.de>
Cc: Eric Blake <eblake@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20181017082702.5581-3-armbru@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -2002,15 +2002,10 @@ static void select_vgahw(const char *p) static void parse_display_qapi(const char *optarg) { - Error *err = NULL; DisplayOptions *opts; Visitor *v; - v = qobject_input_visitor_new_str(optarg, "type", &err); - if (!v) { - error_report_err(err); - exit(1); - } + v = qobject_input_visitor_new_str(optarg, "type", &error_fatal); visit_type_DisplayOptions(v, NULL, &opts, &error_fatal); QAPI_CLONE_MEMBERS(DisplayOptions, &dpy, opts); |