mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
Use error_fatal to simplify obvious fatal errors (again)
Add a slight improvement of the Coccinelle semantic patch from commit
007b06578a
, 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>
This commit is contained in:
parent
4b5766488f
commit
50beeb6809
4 changed files with 23 additions and 17 deletions
|
@ -1002,11 +1002,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
exp = nbd_export_new(bs, dev_offset, fd_size, nbdflags, nbd_export_closed,
|
||||
writethrough, NULL, &local_err);
|
||||
if (!exp) {
|
||||
error_report_err(local_err);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
writethrough, NULL, &error_fatal);
|
||||
nbd_export_set_name(exp, export_name);
|
||||
nbd_export_set_description(exp, export_description);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue