aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-12 07:45:10 +0100
committerMarkus Armbruster <armbru@redhat.com>2015-06-09 07:40:23 +0200
commit1640b200d53e3d981f12a192fe84b7bb7958c065 (patch)
treebea7e4594fee170e218d8b83d43815649551a4b4 /vl.c
parent8809cfc38e4e93884d664bb00108fc71b423f589 (diff)
QemuOpts: Drop qemu_opt_foreach() parameter abort_on_failure
When the argument is non-zero, qemu_opt_foreach() stops on callback returning non-zero, and returns that value. When the argument is zero, it doesn't stop, and returns the callback's value from the last iteration. The two callers that pass zero could just as well pass one: * qemu_spice_init()'s callback add_channel() either returns zero or exit()s. * config_write_opts()'s callback config_write_opt() always returns zero. Drop the parameter, and always stop. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index b3c17228e6..b12e6ffc97 100644
--- a/vl.c
+++ b/vl.c
@@ -4070,8 +4070,8 @@ int main(int argc, char **argv, char **envp)
}
machine_opts = qemu_get_machine_opts();
- if (qemu_opt_foreach(machine_opts, machine_set_property, current_machine,
- 1) < 0) {
+ if (qemu_opt_foreach(machine_opts, machine_set_property,
+ current_machine)) {
object_unref(OBJECT(current_machine));
exit(1);
}