[PATCH 04/21] qemuDomainGetStatsOneBlockFallback: Remove return value

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

 



The function always returns 0. Remove return value and fix callers.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 327edfe506..7318c145d0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17242,22 +17242,20 @@ qemuDomainGetStatsInterface(virQEMUDriver *driver G_GNUC_UNUSED,
 #undef QEMU_ADD_NET_PARAM

 /* refresh information by opening images on the disk */
-static int
+static void
 qemuDomainGetStatsOneBlockFallback(virQEMUDriverConfig *cfg,
                                    virDomainObj *dom,
                                    virTypedParamList *params,
                                    virStorageSource *src,
                                    size_t block_idx)
 {
-    if (virStorageSourceIsEmpty(src))
-        return 0;
-
-    if (virStorageSourceIsFD(src))
-        return 0;
+    if (virStorageSourceIsEmpty(src) ||
+        virStorageSourceIsFD(src))
+        return;

     if (qemuStorageLimitsRefresh(cfg, dom, src, true) <= 0) {
         virResetLastError();
-        return 0;
+        return;
     }

     if (src->allocation)
@@ -17268,8 +17266,6 @@ qemuDomainGetStatsOneBlockFallback(virQEMUDriverConfig *cfg,

     if (src->physical)
         virTypedParamListAddULLong(params, src->physical, "block.%zu.physical", block_idx);
-
-    return 0;
 }


@@ -17287,8 +17283,8 @@ qemuDomainGetStatsOneBlock(virQEMUDriverConfig *cfg,
     /* the VM is offline so we have to go and load the stast from the disk by
      * ourselves */
     if (!virDomainObjIsActive(dom)) {
-        return qemuDomainGetStatsOneBlockFallback(cfg, dom, params,
-                                                  src, block_idx);
+        qemuDomainGetStatsOneBlockFallback(cfg, dom, params, src, block_idx);
+        return 0;
     }

     /* In case where qemu didn't provide the stats we stop here rather than
-- 
2.48.1




[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