diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-10-17 10:26:59 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-10-19 14:51:34 +0200 |
commit | 5343bda42ba1abe61d81ac6b7712e118a3f74280 (patch) | |
tree | c27c419dec1b4de042697a764eb72573dd6326d0 | |
parent | 7c89fcbac865bed392bd645de3bf97f88b869318 (diff) |
vl: Simplify call of parse_name()
main() checks for parse_name() failure even though it can't actually
fail. That's okay. Simplify it to check by passing &error_fatal,
like the other users of qemu_opts_foreach().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20181017082702.5581-36-armbru@redhat.com>
-rw-r--r-- | vl.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -3974,10 +3974,8 @@ int main(int argc, char **argv, char **envp) } #endif - if (qemu_opts_foreach(qemu_find_opts("name"), - parse_name, NULL, NULL)) { - exit(1); - } + qemu_opts_foreach(qemu_find_opts("name"), + parse_name, NULL, &error_fatal); #ifndef _WIN32 qemu_opts_foreach(qemu_find_opts("add-fd"), |