[PATCH 1/3] vz: Remove dead code from vzDomainGetVcpus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]