mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
vz: Remove dead code from vzDomainGetVcpus
'maxcpu' and 'vcpus' are set but not used after that
This commit is contained in:
+1
-8
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user