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 --- qom/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qom') diff --git a/qom/cpu.c b/qom/cpu.c index 9c68fa4810..970377e960 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -71,8 +71,7 @@ CPUState *cpu_generic_init(const char *typename, const char *cpu_model) out: if (err != NULL) { - error_report("%s", error_get_pretty(err)); - error_free(err); + error_report_err(err); object_unref(OBJECT(cpu)); return NULL; } -- cgit v1.2.3