On 7/2/20 10:49 AM, Markus Armbruster wrote:
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 <arm...@redhat.com>
---
+++ 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;
}
Does this one belong in 36/44, given that removal of 'local_err' is
evidence that no other error path needed it?
Either way, it belongs in the series, and the result of the two patches
together is fine.
Reviewed-by: Eric Blake <ebl...@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org