]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - vl.c
vl: Reduce scope of variables in configure_accelerators
[thirdparty/qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index da5bf2de272d1449c3c2d16845ff522fda3aa38e..94c9301e7fa2cd7ccc171ffa9408047759c9c9dd 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2755,7 +2755,6 @@ static int do_configure_accelerator(void *opaque, QemuOpts *opts, Error **errp)
 static void configure_accelerators(const char *progname)
 {
     const char *accel;
-    char **accel_list, **tmp;
     bool init_failed = false;
 
     qemu_opts_foreach(qemu_find_opts("icount"),
@@ -2763,6 +2762,8 @@ static void configure_accelerators(const char *progname)
 
     accel = qemu_opt_get(qemu_get_machine_opts(), "accel");
     if (QTAILQ_EMPTY(&qemu_accel_opts.head)) {
+        char **accel_list, **tmp;
+
         if (accel == NULL) {
             /* Select the default accelerator */
             if (!accel_find("tcg") && !accel_find("kvm")) {