Adding 'else' to reduce checking.

These two conditions are in conflict, adding 'else' to reduce checking.

Signed-off-by: Haiwei Li <lihaiwei@tencent.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Haiwei Li 2020-01-16 16:50:21 +08:00 коммит произвёл Paolo Bonzini
Родитель b91991bf6b
Коммит 17ac43a894
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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;
}