diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-10-17 10:26:43 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-10-19 14:51:34 +0200 |
commit | 7e1e0c11127bde81cff260fc6859690435c509d6 (patch) | |
tree | 745ea82522c4ca1cdf0567358c2accccd16ab18d /qemu-nbd.c | |
parent | 6353218b8c54dc6be6abb01c07a087add07ee5ce (diff) |
qom: Clean up error reporting in user_creatable_add_opts_foreach()
Calling error_report() in a function that takes an Error ** argument
is suspicious. user_creatable_add_opts_foreach() does that, and then
fails without setting an error. Its caller main(), via
qemu_opts_foreach(), is fine with it, but clean it up anyway.
Cc: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20181017082702.5581-20-armbru@redhat.com>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r-- | qemu-nbd.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c index 7874bc973c..ca7109652e 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -766,11 +766,9 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } - if (qemu_opts_foreach(&qemu_object_opts, - user_creatable_add_opts_foreach, - NULL, NULL)) { - exit(EXIT_FAILURE); - } + qemu_opts_foreach(&qemu_object_opts, + user_creatable_add_opts_foreach, + NULL, &error_fatal); if (!trace_init_backends()) { exit(1); |