From e16ca44ab3ce8ec122f8071ca388ea1f75b19173 Mon Sep 17 00:00:00 2001 From: Matt Coleman Date: Thu, 5 Nov 2020 22:32:47 -0500 Subject: [PATCH] domain_conf: make virDomainDiskDefFormatDriver() void This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman Reviewed-by: Michal Privoznik --- 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 0cc385878b..5e74c0de4a 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 if defined there; otherwise, * if defined as child of , then format later */