Fix the '-Wtautological-compare' warning emitted by clang for comparing the

unsigned enum type with a negative value.

Obtained from:	NetApp
This commit is contained in:
Neel Natu 2013-03-16 22:53:05 +00:00
parent 136cbf84ef
commit 3f23d3ca9f

View File

@ -937,7 +937,7 @@ vm_set_x2apic_state(struct vm *vm, int vcpuid, enum x2apic_state state)
if (vcpuid < 0 || vcpuid >= VM_MAXCPU)
return (EINVAL);
if (state < 0 || state >= X2APIC_STATE_LAST)
if (state >= X2APIC_STATE_LAST)
return (EINVAL);
vm->vcpu[vcpuid].x2apic_state = state;