]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
vz: Remove dead code from vzDomainGetVcpus
authorPeter Krempa <pkrempa@redhat.com>
Thu, 2 Jul 2015 14:11:35 +0000 (16:11 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 8 Jul 2015 09:01:33 +0000 (11:01 +0200)
'maxcpu' and 'vcpus' are set but not used after that

src/vz/vz_driver.c

index 8c3c8181f46a80cdeed46d19640506fe7c9996ae..82a1cbd0178f96d425c98170defa20bba7891c28 100644 (file)
@@ -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);