diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-07-07 18:06:05 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-07-10 15:18:08 +0200 |
commit | a5f9b9df252d0dfb407178ef4c3769f78a64b2ff (patch) | |
tree | 3332a93b91cc71e15b74b9cb566451397c1ff387 /block/replication.c | |
parent | 992861fb1e4cf410f30ec8f05bd2dc2a14a5a027 (diff) |
error: Reduce unnecessary error propagation
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, even when we need to keep error_propagate() for other
error paths.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200707160613.848843-38-armbru@redhat.com>
Diffstat (limited to 'block/replication.c')
-rw-r--r-- | block/replication.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/replication.c b/block/replication.c index dcd430624e..0c70215784 100644 --- a/block/replication.c +++ b/block/replication.c @@ -85,7 +85,6 @@ static int replication_open(BlockDriverState *bs, QDict *options, { int ret; BDRVReplicationState *s = bs->opaque; - Error *local_err = NULL; QemuOpts *opts = NULL; const char *mode; const char *top_id; @@ -99,7 +98,7 @@ static int replication_open(BlockDriverState *bs, QDict *options, ret = -EINVAL; opts = qemu_opts_create(&replication_runtime_opts, NULL, 0, &error_abort); - if (!qemu_opts_absorb_qdict(opts, options, &local_err)) { + if (!qemu_opts_absorb_qdict(opts, options, errp)) { goto fail; } |