From 3f23d3ca9fe9521212fc867a7de0d66cb1f2530b Mon Sep 17 00:00:00 2001 From: Neel Natu Date: Sat, 16 Mar 2013 22:53:05 +0000 Subject: [PATCH] Fix the '-Wtautological-compare' warning emitted by clang for comparing the unsigned enum type with a negative value. Obtained from: NetApp --- sys/amd64/vmm/vmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 174d4794d3eb..1de44705a903 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -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;