aboutsummaryrefslogtreecommitdiff
path: root/util/qemu-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/qemu-config.c')
-rw-r--r--util/qemu-config.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/util/qemu-config.c b/util/qemu-config.c
index c0d0e9b8ef..7229c79cc7 100644
--- a/util/qemu-config.c
+++ b/util/qemu-config.c
@@ -339,8 +339,7 @@ int qemu_set_option(const char *str)
return -1;
}
- qemu_opt_set(opts, arg, str + offset + 1, &local_err);
- if (local_err) {
+ if (!qemu_opt_set(opts, arg, str + offset + 1, &local_err)) {
error_report_err(local_err);
return -1;
}
@@ -441,8 +440,7 @@ int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
error_report("no group defined");
goto out;
}
- qemu_opt_set(opts, arg, value, &local_err);
- if (local_err) {
+ if (!qemu_opt_set(opts, arg, value, &local_err)) {
error_report_err(local_err);
goto out;
}
@@ -498,8 +496,7 @@ static void config_parse_qdict_section(QDict *options, QemuOptsList *opts,
goto out;
}
- qemu_opts_absorb_qdict(subopts, subqdict, &local_err);
- if (local_err) {
+ if (!qemu_opts_absorb_qdict(subopts, subqdict, &local_err)) {
error_propagate(errp, local_err);
goto out;
}
@@ -543,8 +540,7 @@ static void config_parse_qdict_section(QDict *options, QemuOptsList *opts,
goto out;
}
- qemu_opts_absorb_qdict(subopts, section, &local_err);
- if (local_err) {
+ if (!qemu_opts_absorb_qdict(subopts, section, &local_err)) {
error_propagate(errp, local_err);
qemu_opts_del(subopts);
goto out;