From 1640b200d53e3d981f12a192fe84b7bb7958c065 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 12 Mar 2015 07:45:10 +0100 Subject: 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 Reviewed-by: Eric Blake --- qdev-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qdev-monitor.c') diff --git a/qdev-monitor.c b/qdev-monitor.c index 9f17c81d9f..b7a2150577 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -564,7 +564,7 @@ DeviceState *qdev_device_add(QemuOpts *opts) } /* set properties */ - if (qemu_opt_foreach(opts, set_property, dev, 1) != 0) { + if (qemu_opt_foreach(opts, set_property, dev)) { object_unparent(OBJECT(dev)); object_unref(OBJECT(dev)); return NULL; -- cgit v1.2.3