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 --- hw/ide/qdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw/ide/qdev.c') diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 1ebb58d..b4103fa 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -172,8 +172,7 @@ static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind) if (kind != IDE_CD) { blkconf_geometry(&dev->conf, &dev->chs_trans, 65536, 16, 255, &err); if (err) { - error_report("%s", error_get_pretty(err)); - error_free(err); + error_report_err(err); return -1; } } -- cgit v1.1