aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2021-07-20 14:53:53 +0200
committerMarkus Armbruster <armbru@redhat.com>2021-08-26 17:15:28 +0200
commitf9734d5d4078f17daf328b9e113aaffe3d00ecaf (patch)
treef0c0f46f58e1576c34b86ed2ee9db13edd57645f /qemu-img.c
parentc83fcfaf8a54d0d034bd0edf7bbb3b0d16669be9 (diff)
error: Use error_fatal to simplify obvious fatal errors (again)
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 <thuth@redhat.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Peter Xu <peterx@redhat.com> Cc: Juan Quintela <quintela@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210720125408.387910-2-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 908fd0cce5..d77f3e76a9 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -5350,7 +5350,6 @@ int main(int argc, char **argv)
{
const img_cmd_t *cmd;
const char *cmdname;
- Error *local_error = NULL;
int c;
static const struct option long_options[] = {
{"help", no_argument, 0, 'h'},
@@ -5368,10 +5367,7 @@ int main(int argc, char **argv)
module_call_init(MODULE_INIT_TRACE);
qemu_init_exec_dir(argv[0]);
- if (qemu_init_main_loop(&local_error)) {
- error_report_err(local_error);
- exit(EXIT_FAILURE);
- }
+ qemu_init_main_loop(&error_fatal);
qcrypto_init(&error_fatal);