mirror of https://github.com/xemu-project/xemu.git
hw/i386/x86: Reverse if statement
The if statement currently uses double negation when executing the else branch. So swap the branches and simplify the condition to make the code more comprehensible. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Message-Id: <20240106132546.21248-2-shentey@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
7618fffdf1
commit
f22f3a92eb
|
@ -520,10 +520,10 @@ static void x86_nmi(NMIState *n, int cpu_index, Error **errp)
|
||||||
CPU_FOREACH(cs) {
|
CPU_FOREACH(cs) {
|
||||||
X86CPU *cpu = X86_CPU(cs);
|
X86CPU *cpu = X86_CPU(cs);
|
||||||
|
|
||||||
if (!cpu->apic_state) {
|
if (cpu->apic_state) {
|
||||||
cpu_interrupt(cs, CPU_INTERRUPT_NMI);
|
|
||||||
} else {
|
|
||||||
apic_deliver_nmi(cpu->apic_state);
|
apic_deliver_nmi(cpu->apic_state);
|
||||||
|
} else {
|
||||||
|
cpu_interrupt(cs, CPU_INTERRUPT_NMI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue