[PATCH 11/28] domain_conf: make virDomainDiskDefFormatDriver() void

Matt Coleman mcoleman at datto.com
Fri Nov 6 03:32:47 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 | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index a3bfa11817..88125683d1 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -25648,7 +25648,7 @@ virDomainDiskDefFormatIotune(virBufferPtr buf,
 #undef FORMAT_IOTUNE
 
 
-static int
+static void
 virDomainDiskDefFormatDriver(virBufferPtr buf,
                              virDomainDiskDefPtr disk)
 {
@@ -25705,7 +25705,6 @@ virDomainDiskDefFormatDriver(virBufferPtr buf,
     virDomainVirtioOptionsFormat(&driverBuf, disk->virtio);
 
     virXMLFormatElement(buf, "driver", &driverBuf, NULL);
-    return 0;
 }
 
 
@@ -25837,8 +25836,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
     virBufferAddLit(buf, ">\n");
     virBufferAdjustIndent(buf, 2);
 
-    if (virDomainDiskDefFormatDriver(buf, def) < 0)
-        return -1;
+    virDomainDiskDefFormatDriver(buf, def);
 
     /* Format as child of <disk> if defined there; otherwise,
      * if defined as child of <source>, then format later */
-- 
2.27.0





More information about the libvir-list mailing list