[libvirt] [PATCH] qemu: Minimalize global driver accesses

Whilst working on another issue, I've noticed that in some functions we have a local @driver variable among with access to global @qemu_driver variable. This makes no sense. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bacabd2..3495cbf 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3831,7 +3831,7 @@ qemuDomainScreenshot(virDomainPtr dom, } unlink_tmp = true; - virSecurityManagerSetSavedStateLabel(qemu_driver->securityManager, vm->def, tmp); + virSecurityManagerSetSavedStateLabel(driver->securityManager, vm->def, tmp); qemuDomainObjEnterMonitor(driver, vm); if (qemuMonitorScreendump(priv->mon, tmp) < 0) { @@ -11449,7 +11449,7 @@ qemuDomainMemoryPeek(virDomainPtr dom, goto endjob; } - virSecurityManagerSetSavedStateLabel(qemu_driver->securityManager, vm->def, tmp); + virSecurityManagerSetSavedStateLabel(driver->securityManager, vm->def, tmp); priv = vm->privateData; qemuDomainObjEnterMonitor(driver, vm); -- 2.8.4

On Wed, Oct 26, 2016 at 01:01:39PM +0200, Michal Privoznik wrote:
Whilst working on another issue, I've noticed that in some functions we have a local @driver variable among with access to global @qemu_driver variable. This makes no sense.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ACK, trivial
participants (2)
-
Martin Kletzander
-
Michal Privoznik