diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-09-11 15:04:45 +0200 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:28:24 -0600 |
commit | c40ca5f0bdb9c0efba26e0cc0789fda1c6d4f288 (patch) | |
tree | ef0b9f92477851b9d32edf5e7514cf17ffe4087f /hw/ppc/spapr_rtas.c | |
parent | aff6a93abbc8412cb53c02a136deaaa39469ac72 (diff) | |
download | hqemu-c40ca5f0bdb9c0efba26e0cc0789fda1c6d4f288.zip hqemu-c40ca5f0bdb9c0efba26e0cc0789fda1c6d4f288.tar.gz |
Use error_fatal to simplify obvious fatal errors
Done with this Coccinelle semantic patch:
@@
type T;
identifier FUN, RET;
expression list ARGS;
expression ERR, EC;
@@
(
- T RET = FUN(ARGS, &ERR);
+ T RET = FUN(ARGS, &error_fatal);
|
- RET = FUN(ARGS, &ERR);
+ RET = FUN(ARGS, &error_fatal);
|
- FUN(ARGS, &ERR);
+ FUN(ARGS, &error_fatal);
)
- if (ERR != NULL) {
- error_report_err(ERR);
- exit(EC);
- }
This is actually a more elegant version of my initial semantic patch
by courtesy of Eduardo.
It leaves dead Error * variables behind, cleaned up manually.
Cc: qemu-arm@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/ppc/spapr_rtas.c')
0 files changed, 0 insertions, 0 deletions