error: Eliminate error_propagate() manually

When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away.  The previous two commits did that for sufficiently simple
cases with Coccinelle.  Do it for several more manually.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200707160613.848843-37-armbru@redhat.com>
This commit is contained in:
Markus Armbruster 2020-07-07 18:06:04 +02:00
parent af175e85f9
commit 992861fb1e
18 changed files with 67 additions and 149 deletions

View file

@ -1031,14 +1031,11 @@ out:
static void write_dump_header(DumpState *s, Error **errp)
{
Error *local_err = NULL;
if (s->dump_info.d_class == ELFCLASS32) {
create_header32(s, &local_err);
create_header32(s, errp);
} else {
create_header64(s, &local_err);
create_header64(s, errp);
}
error_propagate(errp, local_err);
}
static size_t dump_bitmap_get_bufsize(DumpState *s)