From: Peter Krempa Date: Thu, 2 Jul 2015 14:11:35 +0000 (+0200) Subject: vz: Remove dead code from vzDomainGetVcpus X-Git-Tag: v1.2.18-rc1~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cba7f345046c50d680f4e6751f5b6fbedb491a05;p=thirdparty%2Flibvirt.git vz: Remove dead code from vzDomainGetVcpus 'maxcpu' and 'vcpus' are set but not used after that --- 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);