(qemu|lxc)DomainGetCPUStats: Clean up

Remove unnecessary condition and variable.
This commit is contained in:
Peter Krempa 2015-12-07 05:48:46 +01:00
parent 68ee703bfe
commit 51f07d8f0f
2 changed files with 2 additions and 5 deletions

View File

@ -5704,8 +5704,7 @@ lxcDomainGetCPUStats(virDomainPtr dom,
ret = virCgroupGetPercpuStats(priv->cgroup, params,
nparams, start_cpu, ncpus, 0);
cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnlock(vm);
return ret;
}

View File

@ -18081,7 +18081,6 @@ qemuDomainGetCPUStats(virDomainPtr domain,
{
virDomainObjPtr vm = NULL;
int ret = -1;
bool isActive;
qemuDomainObjPrivatePtr priv;
virCheckFlags(VIR_TYPED_PARAM_STRING_OKAY, -1);
@ -18094,8 +18093,7 @@ qemuDomainGetCPUStats(virDomainPtr domain,
if (virDomainGetCPUStatsEnsureACL(domain->conn, vm->def) < 0)
goto cleanup;
isActive = virDomainObjIsActive(vm);
if (!isActive) {
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("domain is not running"));
goto cleanup;