From a4c7367f7dd9348f94dc4298571ed515b8160a27 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 13 Mar 2015 11:07:24 +0100 Subject: QemuOpts: Drop qemu_opts_foreach() parameter abort_on_failure When the argument is non-zero, qemu_opts_foreach() stops on callback returning non-zero, and returns that value. When the argument is zero, it doesn't stop, and returns the bit-wise inclusive or of all the return values. Funky :) The callers that pass zero could just as well pass one, because their callbacks can't return anything but zero: * qemu_add_globals()'s callback qdev_add_one_global() * qemu_config_write()'s callback config_write_opts() * main()'s callbacks default_driver_check(), drive_enable_snapshot(), vnc_init_func() Drop the parameter, and always stop. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Acked-by: Kevin Wolf --- tpm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tpm.c') diff --git a/tpm.c b/tpm.c index 963b7ee0d8..bca3b3a98f 100644 --- a/tpm.c +++ b/tpm.c @@ -207,8 +207,7 @@ void tpm_cleanup(void) */ int tpm_init(void) { - if (qemu_opts_foreach(qemu_find_opts("tpmdev"), - tpm_init_tpmdev, NULL, 1) != 0) { + if (qemu_opts_foreach(qemu_find_opts("tpmdev"), tpm_init_tpmdev, NULL)) { return -1; } -- cgit v1.2.3