]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
domain_conf: make virDomainDiskDefFormatDriver() void
authorMatt Coleman <mcoleman@datto.com>
Fri, 6 Nov 2020 03:32:47 +0000 (22:32 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 11 Nov 2020 11:53:11 +0000 (12:53 +0100)
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c

index 0cc385878b480f8e743b47f4329738e4ea94d64f..5e74c0de4aef667e5f55902d7ff9cdb86caa5805 100644 (file)
@@ -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 */