msix: use range helper function.

use range helper function in msix_write_config().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Isaku Yamahata 2009-12-15 20:26:04 +09:00 committed by Michael S. Tsirkin
parent a40e3411d1
commit 98a3cb024b

View File

@ -175,7 +175,7 @@ void msix_write_config(PCIDevice *dev, uint32_t addr,
unsigned enable_pos = dev->msix_cap + MSIX_CONTROL_OFFSET;
int vector;
if (addr + len <= enable_pos || addr > enable_pos) {
if (!range_covers_byte(addr, len, enable_pos)) {
return;
}