From cba7f345046c50d680f4e6751f5b6fbedb491a05 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 2 Jul 2015 16:11:35 +0200 Subject: [PATCH] vz: Remove dead code from vzDomainGetVcpus 'maxcpu' and 'vcpus' are set but not used after that --- src/vz/vz_driver.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 8c3c8181f4..82a1cbd017 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -807,7 +807,7 @@ vzDomainGetVcpus(virDomainPtr domain, { virDomainObjPtr privdom = NULL; size_t i; - int v, maxcpu, hostcpus; + int v; int ret = -1; if (!(privdom = vzDomObjFromDomainRef(domain))) @@ -820,13 +820,6 @@ vzDomainGetVcpus(virDomainPtr domain, goto cleanup; } - if ((hostcpus = nodeGetCPUCount()) < 0) - goto cleanup; - - maxcpu = maplen * 8; - if (maxcpu > hostcpus) - maxcpu = hostcpus; - if (maxinfo >= 1) { if (info != NULL) { memset(info, 0, sizeof(*info) * maxinfo); -- 2.39.5