[PATCH 5/7] qemu: Check all watchdogs for iTCO duplicates

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

 



The loop initially skipped the first one because it was mainly checking
the incompatible actions, but was then modified to also check the
duplicity of iTCO watchdogs.

While at it change the type of the iteration variable to the usual size_t.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2187133
Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/qemu/qemu_validate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 6ebd2ba0101f..a03f7056b191 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -1111,9 +1111,9 @@ static int
 qemuValidateDomainDefWatchdogs(const virDomainDef *def)
 {
     bool found_itco = false;
-    ssize_t i = 0;
+    size_t i = 0;
 
-    for (i = 1; i < def->nwatchdogs; i++) {
+    for (i = 0; i < def->nwatchdogs; i++) {
         /* We could theoretically support different watchdogs having dump and
          * pause, but let's be honest, we support multiple watchdogs only
          * because we need to be able to add a second, implicit one, not because
-- 
2.40.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux