The function does not do anything that could fail. Remove the return
value.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_domain.c | 16 ++++------------
src/qemu/qemu_domain.h | 5 ++---
tests/qemublocktest.c | 3 +--
3 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 6a93dd5293..29212eaa10 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -10383,9 +10383,7 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
return -1;
qemuDomainPrepareStorageSourceConfig(n, cfg, priv->qemuCaps);
-
- if (qemuDomainPrepareDiskSourceData(disk, n) < 0)
- return -1;
+ qemuDomainPrepareDiskSourceData(disk, n);
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV) &&
qemuDomainPrepareStorageSourceBlockdev(disk, n, priv, cfg) < 0)
@@ -15093,7 +15091,7 @@ qemuDomainCheckCCWS390AddressSupport(const virDomainDef *def,
* chain. This function should be also called for detected backing chain
* members.
*/
-int
+void
qemuDomainPrepareDiskSourceData(virDomainDiskDefPtr disk,
virStorageSourcePtr src)
{
@@ -15108,8 +15106,6 @@ qemuDomainPrepareDiskSourceData(virDomainDiskDefPtr disk,
if (disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY)
src->floppyimg = true;
-
- return 0;
}
@@ -15162,9 +15158,7 @@ qemuDomainPrepareDiskSourceLegacy(virDomainDiskDefPtr disk,
return -1;
qemuDomainPrepareStorageSourceConfig(disk->src, cfg, priv->qemuCaps);
-
- if (qemuDomainPrepareDiskSourceData(disk, disk->src) < 0)
- return -1;
+ qemuDomainPrepareDiskSourceData(disk, disk->src);
if (qemuDomainSecretStorageSourcePrepare(priv, disk->src,
disk->info.alias,
@@ -15198,9 +15192,7 @@ qemuDomainPrepareStorageSourceBlockdev(virDomainDiskDefPtr disk,
return -1;
qemuDomainPrepareStorageSourceConfig(src, cfg, priv->qemuCaps);
-
- if (qemuDomainPrepareDiskSourceData(disk, src) < 0)
- return -1;
+ qemuDomainPrepareDiskSourceData(disk, src);
if (qemuDomainSecretStorageSourcePrepare(priv, src,
src->nodestorage,
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 14367f7320..5b3d84cea7 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -1167,10 +1167,9 @@ qemuDomainCheckCCWS390AddressSupport(const virDomainDef *def,
virQEMUCapsPtr qemuCaps,
const char *devicename);
-int
+void
qemuDomainPrepareDiskSourceData(virDomainDiskDefPtr disk,
- virStorageSourcePtr src)
- G_GNUC_WARN_UNUSED_RESULT;
+ virStorageSourcePtr src);
int
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
index 9b7abceb40..08eec11ef9 100644
--- a/tests/qemublocktest.c
+++ b/tests/qemublocktest.c
@@ -223,8 +223,7 @@ testQemuDiskXMLToProps(const void *opaque)
if (qemuDomainValidateStorageSource(n, data->qemuCaps) < 0)
goto cleanup;
- if (qemuDomainPrepareDiskSourceData(disk, n) < 0)
- goto cleanup;
+ qemuDomainPrepareDiskSourceData(disk, n);
if (!(formatProps = qemuBlockStorageSourceGetBlockdevProps(n,
n->backingStore)) ||
!(storageSrcOnlyProps = qemuBlockStorageSourceGetBackendProps(n, false, true,
true)) ||
--
2.21.0