Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_driver.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f0f08dcbfc..319f2d9476 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -21536,22 +21536,18 @@ qemuDomainGetStatsBlockExportHeader(virDomainDiskDefPtr disk,
size_t recordnr,
virTypedParamListPtr params)
{
- int ret = -1;
-
if (virTypedParamListAddS(params, disk->dst, "block.%zu.name", recordnr)
< 0)
- goto cleanup;
+ return -1;
if (virStorageSourceIsLocalStorage(src) && src->path &&
virTypedParamListAddS(params, src->path, "block.%zu.path", recordnr)
< 0)
- goto cleanup;
+ return -1;
if (src->id &&
virTypedParamListAddUI(params, src->id, "block.%zu.backingIndex",
recordnr) < 0)
- goto cleanup;
+ return -1;
- ret = 0;
- cleanup:
- return ret;
+ return 0;
}
@@ -21795,20 +21791,16 @@ qemuDomainGetStatsPerf(virQEMUDriverPtr driver
ATTRIBUTE_UNUSED,
{
size_t i;
qemuDomainObjPrivatePtr priv = dom->privateData;
- int ret = -1;
for (i = 0; i < VIR_PERF_EVENT_LAST; i++) {
if (!virPerfEventIsEnabled(priv->perf, i))
continue;
if (qemuDomainGetStatsPerfOneEvent(priv->perf, i, params) < 0)
- goto cleanup;
+ return -1;
}
- ret = 0;
-
- cleanup:
- return ret;
+ return 0;
}
typedef int
--
2.21.0