]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vl: Simplify call of parse_name()
authorMarkus Armbruster <armbru@redhat.com>
Wed, 17 Oct 2018 08:26:59 +0000 (10:26 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 19 Oct 2018 12:51:34 +0000 (14:51 +0200)
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>

vl.c

diff --git a/vl.c b/vl.c
index 812ceba4255d238bb2d272daec24981a242b151d..d53e2563e9ff0b12b4dd650f6a2340601df4c68e 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -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"),