aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-07-07 18:05:35 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-10 15:01:06 +0200
commitc6ecec43b240b545ef2f1d6eed5b1e539dfdb2c1 (patch)
tree5114a8cc8f4a6b4e7e81a9ca63e54236126c4fae /block
parent79c3e2bc6e78eb9cb197a9b3a9fc885ec1b7c720 (diff)
qemu-option: Check return value instead of @err where convenient
Convert uses like opts = qemu_opts_create(..., &err); if (err) { ... } to opts = qemu_opts_create(..., errp); if (!opts) { ... } Eliminate error_propagate() that are now unnecessary. Delete @err that are now unused. Note that we can't drop parallels_open()'s error_propagate() here. We continue to execute it even in the converted case. It's a no-op then: local_err is null. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Greg Kurz <groug@kaod.org> Message-Id: <20200707160613.848843-8-armbru@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/parallels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/parallels.c b/block/parallels.c
index 63a1cde8af..f26f03c926 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -824,8 +824,8 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
}
}
- opts = qemu_opts_create(&parallels_runtime_opts, NULL, 0, &local_err);
- if (local_err != NULL) {
+ opts = qemu_opts_create(&parallels_runtime_opts, NULL, 0, errp);
+ if (!opts) {
goto fail_options;
}