ioapic: remove useless lower bounds check
The vector cannot be negative. Coverity now reports this because it sees an array access before the check, in ioapic_stat_update_irq. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ea3d77c889
commit
960a479f7f
@ -152,7 +152,7 @@ static void ioapic_set_irq(void *opaque, int vector, int level)
|
||||
if (vector == 0) {
|
||||
vector = 2;
|
||||
}
|
||||
if (vector >= 0 && vector < IOAPIC_NUM_PINS) {
|
||||
if (vector < IOAPIC_NUM_PINS) {
|
||||
uint32_t mask = 1 << vector;
|
||||
uint64_t entry = s->ioredtbl[vector];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user