Drop the 'driver' argument since it can be extracted from private data
to shorten the argument list.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_driver.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5852df2a53..71503898e4 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17534,14 +17534,14 @@ qemuDomainBlockPivot(virQEMUDriverPtr driver,
/* bandwidth in MiB/s per public API. Caller must lock vm beforehand,
* and not access it afterwards. */
static int
-qemuDomainBlockPullCommon(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
+qemuDomainBlockPullCommon(virDomainObjPtr vm,
const char *path,
const char *base,
unsigned long bandwidth,
unsigned int flags)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
+ virQEMUDriverPtr driver = priv->driver;
const char *device = NULL;
const char *jobname = NULL;
virDomainDiskDefPtr disk;
@@ -18355,7 +18355,6 @@ static int
qemuDomainBlockRebase(virDomainPtr dom, const char *path, const char *base,
unsigned long bandwidth, unsigned int flags)
{
- virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
unsigned long long speed = bandwidth;
@@ -18384,7 +18383,7 @@ qemuDomainBlockRebase(virDomainPtr dom, const char *path, const
char *base,
/* For normal rebase (enhanced blockpull), the common code handles
* everything, including vm cleanup. */
if (!(flags & VIR_DOMAIN_BLOCK_REBASE_COPY))
- return qemuDomainBlockPullCommon(driver, vm, path, base, bandwidth, flags);
+ return qemuDomainBlockPullCommon(vm, path, base, bandwidth, flags);
/* If we got here, we are doing a block copy rebase. */
if (!(dest = virStorageSourceNew()))
@@ -18540,8 +18539,7 @@ qemuDomainBlockPull(virDomainPtr dom, const char *path, unsigned
long bandwidth,
return -1;
}
- return qemuDomainBlockPullCommon(dom->conn->privateData,
- vm, path, NULL, bandwidth, flags);
+ return qemuDomainBlockPullCommon(vm, path, NULL, bandwidth, flags);
}
--
2.21.0