From 98a3cb024b0e4d5a4b1458946a82ea9b9619ba1c Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Tue, 15 Dec 2009 20:26:04 +0900 Subject: msix: use range helper function. use range helper function in msix_write_config(). Signed-off-by: Isaku Yamahata Signed-off-by: Michael S. Tsirkin --- hw/msix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/msix.c b/hw/msix.c index 0baedef..2ca0900 100644 --- a/hw/msix.c +++ b/hw/msix.c @@ -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; } -- cgit v1.1