aboutsummaryrefslogtreecommitdiff
path: root/block/gluster.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/gluster.c')
-rw-r--r--block/gluster.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/block/gluster.c b/block/gluster.c
index 31233ca..b68bd32 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -523,8 +523,7 @@ static int qemu_gluster_parse_json(BlockdevOptionsGluster *gconf,
/* create opts info from runtime_json_opts list */
opts = qemu_opts_create(&runtime_json_opts, NULL, 0, &error_abort);
- qemu_opts_absorb_qdict(opts, options, &local_err);
- if (local_err) {
+ if (!qemu_opts_absorb_qdict(opts, options, &local_err)) {
goto out;
}
@@ -555,8 +554,7 @@ static int qemu_gluster_parse_json(BlockdevOptionsGluster *gconf,
/* create opts info from runtime_type_opts list */
opts = qemu_opts_create(&runtime_type_opts, NULL, 0, &error_abort);
- qemu_opts_absorb_qdict(opts, backing_options, &local_err);
- if (local_err) {
+ if (!qemu_opts_absorb_qdict(opts, backing_options, &local_err)) {
goto out;
}
@@ -586,8 +584,7 @@ static int qemu_gluster_parse_json(BlockdevOptionsGluster *gconf,
if (gsconf->type == SOCKET_ADDRESS_TYPE_INET) {
/* create opts info from runtime_inet_opts list */
opts = qemu_opts_create(&runtime_inet_opts, NULL, 0, &error_abort);
- qemu_opts_absorb_qdict(opts, backing_options, &local_err);
- if (local_err) {
+ if (!qemu_opts_absorb_qdict(opts, backing_options, &local_err)) {
goto out;
}
@@ -635,8 +632,7 @@ static int qemu_gluster_parse_json(BlockdevOptionsGluster *gconf,
} else {
/* create opts info from runtime_unix_opts list */
opts = qemu_opts_create(&runtime_unix_opts, NULL, 0, &error_abort);
- qemu_opts_absorb_qdict(opts, backing_options, &local_err);
- if (local_err) {
+ if (!qemu_opts_absorb_qdict(opts, backing_options, &local_err)) {
goto out;
}
@@ -819,8 +815,7 @@ static int qemu_gluster_open(BlockDriverState *bs, QDict *options,
const char *filename, *logfile;
opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort);
- qemu_opts_absorb_qdict(opts, options, &local_err);
- if (local_err) {
+ if (!qemu_opts_absorb_qdict(opts, options, &local_err)) {
error_propagate(errp, local_err);
ret = -EINVAL;
goto out;