[PATCH 10/28] domain_conf: make virDomainDiskDefFormatIotune() void

Matt Coleman mcoleman at datto.com
Fri Nov 6 03:32:46 UTC 2020


This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt at datto.com>
---
 src/conf/domain_conf.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c106de7f81..a3bfa11817 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -25605,7 +25605,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf,
                               disk->blkdeviotune.val); \
         }
 
-static int
+static void
 virDomainDiskDefFormatIotune(virBufferPtr buf,
                              virDomainDiskDefPtr disk)
 {
@@ -25643,8 +25643,6 @@ virDomainDiskDefFormatIotune(virBufferPtr buf,
     FORMAT_IOTUNE(write_iops_sec_max_length);
 
     virXMLFormatElement(buf, "iotune", NULL, &childBuf);
-
-    return 0;
 }
 
 #undef FORMAT_IOTUNE
@@ -25880,8 +25878,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
     }
     virBufferAddLit(buf, "/>\n");
 
-    if (virDomainDiskDefFormatIotune(buf, def) < 0)
-        return -1;
+    virDomainDiskDefFormatIotune(buf, def);
 
     if (def->src->readonly)
         virBufferAddLit(buf, "<readonly/>\n");
-- 
2.27.0





More information about the libvir-list mailing list