[PATCH] qemu: fix uninitialized variable in qemuParseCommandLine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Newly added if branch for kvm_pv_eoi did not set the ret variable.
---
 src/qemu/qemu_command.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index ec825bc..d0c8e22 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7655,7 +7655,7 @@ qemuParseCommandLineCPU(virDomainDefPtr dom,
         else if (*p == '+' || *p == '-') {
             char *feature;
             int policy;
-            int ret;
+            int ret = 0;
 
             if (*p == '+')
                 policy = VIR_CPU_FEATURE_REQUIRE;
@@ -7702,7 +7702,6 @@ qemuParseCommandLineCPU(virDomainDefPtr dom,
                     goto error;
                 }
                 dom->clock.timers[i]->present = present;
-                ret = 0;
             } else if (STREQ(feature, "kvm_pv_eoi")) {
                 if (policy == VIR_CPU_FEATURE_REQUIRE)
                     dom->apic_eoi = VIR_DOMAIN_APIC_EOI_ON;
-- 
1.7.8.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]