]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
test: Remove unused variate @maxcpu in testDomainGetVcpus
authorWang King <king.wang@huawei.com>
Thu, 13 Apr 2017 02:16:07 +0000 (10:16 +0800)
committerCole Robinson <crobinso@redhat.com>
Wed, 10 May 2017 19:34:13 +0000 (15:34 -0400)
Since refactoring by commit id '3dd859c0', @maxcpu is no longer used.

(cherry picked from commit b2641b43920917b17e3c10b6a9898c3ff1c82543)

src/test/test_driver.c

index 866949558bb29f6a7a164c4bef2f6e0d969a6c9c..16ec2b72974720a05e0594f61ec1ff8a8ea0b00c 100644 (file)
@@ -2475,7 +2475,7 @@ static int testDomainGetVcpus(virDomainPtr domain,
     virDomainObjPtr privdom;
     virDomainDefPtr def;
     size_t i;
-    int maxcpu, hostcpus;
+    int hostcpus;
     int ret = -1;
     struct timeval tv;
     unsigned long long statbase;
@@ -2501,10 +2501,6 @@ static int testDomainGetVcpus(virDomainPtr domain,
     statbase = (tv.tv_sec * 1000UL * 1000UL) + tv.tv_usec;
 
     hostcpus = VIR_NODEINFO_MAXCPUS(privconn->nodeInfo);
-    maxcpu = maplen * 8;
-    if (maxcpu > hostcpus)
-        maxcpu = hostcpus;
-
     if (!(allcpumap = virBitmapNew(hostcpus)))
         goto cleanup;