提交 b4418464 编写于 作者: J Ján Tomko 提交者: Osier Yang

qemu: fix uninitialized variable in qemuParseCommandLine

Newly added if branch for kvm_pv_eoi did not set the ret variable.
上级 6b07dff0
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部