From 565f65d271984a32eed2c324ff6ef8be33f7f3d2 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 12 Feb 2015 13:55:05 +0100 Subject: 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 Reviewed-by: Eric Blake --- qemu-char.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qemu-char.c') diff --git a/qemu-char.c b/qemu-char.c index 98d434237f..f901ed1583 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3753,8 +3753,7 @@ CharDriverState *qemu_chr_new(const char *label, const char *filename, void (*in chr = qemu_chr_new_from_opts(opts, init, &err); if (err) { - error_report("%s", error_get_pretty(err)); - error_free(err); + error_report_err(err); } if (chr && qemu_opt_get_bool(opts, "mux", 0)) { qemu_chr_fe_claim_no_fail(chr); -- cgit v1.2.3