This function always returns zero, so it might as well be void.
Signed-off-by: Matt Coleman <matt(a)datto.com>
---
src/conf/domain_conf.c | 6 +-----
src/conf/domain_conf.h | 4 ++--
src/qemu/qemu_driver.c | 6 ++----
src/test/test_driver.c | 3 +--
4 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7c4e34a2e6..25baa44a92 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -31963,10 +31963,8 @@ virDomainDefVcpuOrderClear(virDomainDefPtr def)
*
* Set the block I/O tune settings from @info on the @disk, but error out early
* in case of any error. That is to make sure nothing will fail half-way.
- *
- * Returns: 0 on success, -1 otherwise
*/
-int
+void
virDomainDiskSetBlockIOTune(virDomainDiskDefPtr disk,
virDomainBlockIoTuneInfo *info)
{
@@ -31977,8 +31975,6 @@ virDomainDiskSetBlockIOTune(virDomainDiskDefPtr disk,
VIR_FREE(disk->blkdeviotune.group_name);
disk->blkdeviotune = *info;
disk->blkdeviotune.group_name = g_steal_pointer(&tmp_group);
-
- return 0;
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4608c1fafb..c1f182af1b 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3804,8 +3804,8 @@ virDomainGetBlkioParametersAssignFromDef(virDomainDefPtr def,
int *nparams,
int maxparams);
-int virDomainDiskSetBlockIOTune(virDomainDiskDefPtr disk,
- virDomainBlockIoTuneInfo *info);
+void virDomainDiskSetBlockIOTune(virDomainDiskDefPtr disk,
+ virDomainBlockIoTuneInfo *info);
bool
virDomainNetTypeSharesHostView(const virDomainNetDef *net);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index cb56fbbfcf..591e3ec706 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16324,8 +16324,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
goto endjob;
ret = -1;
- if (virDomainDiskSetBlockIOTune(disk, &info) < 0)
- goto endjob;
+ virDomainDiskSetBlockIOTune(disk, &info);
qemuDomainSetGroupBlockIoTune(def, &info);
@@ -16356,8 +16355,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
if (qemuDomainCheckBlockIoTuneReset(conf_disk, &conf_info) < 0)
goto endjob;
- if (virDomainDiskSetBlockIOTune(conf_disk, &conf_info) < 0)
- goto endjob;
+ virDomainDiskSetBlockIOTune(conf_disk, &conf_info);
qemuDomainSetGroupBlockIoTune(persistentDef, &conf_info);
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 5c02a8ebb0..0f3d414a6a 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -3832,8 +3832,7 @@ testDomainSetBlockIoTune(virDomainPtr dom,
#undef TEST_BLOCK_IOTUNE_MAX_CHECK
- if (virDomainDiskSetBlockIOTune(conf_disk, &info) < 0)
- goto cleanup;
+ virDomainDiskSetBlockIOTune(conf_disk, &info);
info.group_name = NULL;
ret = 0;
--
2.27.0