mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
error: Use error_report_err() where appropriate
Coccinelle semantic patch: @@ expression E; @@ - error_report("%s", error_get_pretty(E)); - error_free(E); + error_report_err(E); @@ expression E, S; @@ - error_report("%s", error_get_pretty(E)); + error_report_err(E); ( exit(S); | abort(); ) Trivial manual touch-ups in block/sheepdog.c. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
2ee2f1e415
commit
565f65d271
31 changed files with 79 additions and 127 deletions
|
@ -32,8 +32,7 @@ QemuOptsList *qemu_find_opts(const char *group)
|
|||
|
||||
ret = find_list(vm_config_groups, group, &local_err);
|
||||
if (local_err) {
|
||||
error_report("%s", error_get_pretty(local_err));
|
||||
error_free(local_err);
|
||||
error_report_err(local_err);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -314,8 +313,7 @@ int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
|
|||
/* group with id */
|
||||
list = find_list(lists, group, &local_err);
|
||||
if (local_err) {
|
||||
error_report("%s", error_get_pretty(local_err));
|
||||
error_free(local_err);
|
||||
error_report_err(local_err);
|
||||
goto out;
|
||||
}
|
||||
opts = qemu_opts_create(list, id, 1, NULL);
|
||||
|
@ -325,8 +323,7 @@ int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
|
|||
/* group without id */
|
||||
list = find_list(lists, group, &local_err);
|
||||
if (local_err) {
|
||||
error_report("%s", error_get_pretty(local_err));
|
||||
error_free(local_err);
|
||||
error_report_err(local_err);
|
||||
goto out;
|
||||
}
|
||||
opts = qemu_opts_create(list, NULL, 0, &error_abort);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue