[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 2/3] qemu: When reserving all functions on a slot don't reserve function 0 on the next slot.



Signed-off-by: Steve Hodgson <shodgson solarflare com>
---
 src/qemu/qemu_command.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index dbfc7d9..12adcc0 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -878,7 +878,7 @@ int qemuDomainPCIAddressReserveSlot(qemuDomainPCIAddressSetPtr addrs,
 {
     int function;
 
-    for (function = 0; function <= QEMU_PCI_ADDRESS_LAST_FUNCTION; function++) {
+    for (function = 0; function < QEMU_PCI_ADDRESS_LAST_FUNCTION; function++) {
         if (qemuDomainPCIAddressReserveFunction(addrs, slot, function) < 0)
             goto cleanup;
     }
@@ -956,7 +956,7 @@ int qemuDomainPCIAddressReleaseSlot(qemuDomainPCIAddressSetPtr addrs, int slot)
     dev.addr.pci.bus = 0;
     dev.addr.pci.slot = slot;
 
-    for (*function = 0; *function <= QEMU_PCI_ADDRESS_LAST_FUNCTION; (*function)++) {
+    for (*function = 0; *function < QEMU_PCI_ADDRESS_LAST_FUNCTION; (*function)++) {
         addr = qemuPCIAddressAsString(&dev);
         if (!addr)
             return -1;
-- 
1.7.4.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]