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:
Markus Armbruster 2015-02-12 13:55:05 +01:00
parent 2ee2f1e415
commit 565f65d271
31 changed files with 79 additions and 127 deletions

View file

@ -2163,8 +2163,7 @@ X86CPU *cpu_x86_init(const char *cpu_model)
out:
if (error) {
error_report("%s", error_get_pretty(error));
error_free(error);
error_report_err(error);
if (cpu != NULL) {
object_unref(OBJECT(cpu));
cpu = NULL;