'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 47c5023..a489767 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -823,7 +823,7 @@ vzDomainGetVcpus(virDomainPtr domain,
 {
     virDomainObjPtr privdom = NULL;
     size_t i;
-    int v, maxcpu, hostcpus;
+    int v;
     int ret = -1;

     if (!(privdom = vzDomObjFromDomainRef(domain)))
@@ -836,13 +836,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.4.5

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to