Commit 17ac43a8 authored by Haiwei Li's avatar Haiwei Li Committed by Paolo Bonzini

Adding 'else' to reduce checking.

These two conditions are in conflict, adding 'else' to reduce checking.
Signed-off-by: default avatarHaiwei Li <lihaiwei@tencent.com>
Reviewed-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent b91991bf
......@@ -1571,9 +1571,9 @@ static void kvm_apic_inject_pending_timer_irqs(struct kvm_lapic *apic)
struct kvm_timer *ktimer = &apic->lapic_timer;
kvm_apic_local_deliver(apic, APIC_LVTT);
if (apic_lvtt_tscdeadline(apic))
if (apic_lvtt_tscdeadline(apic)) {
ktimer->tscdeadline = 0;
if (apic_lvtt_oneshot(apic)) {
} else if (apic_lvtt_oneshot(apic)) {
ktimer->tscdeadline = 0;
ktimer->target_expiration = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment