[PATCH 2/5] vmx: Remove unused variable in virVMXParseConfig

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

 



cpumasklen is only ever written to. Remove it.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/vmx/vmx.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 8ffd5ff088..429630faaf 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1301,7 +1301,6 @@ virVMXParseConfig(virVMXContext *ctx,
     int unit;
     bool hgfs_disabled = true;
     long long sharedFolder_maxNum = 0;
-    int cpumasklen;
     struct virVMXConfigScanResults results = { -1 };
     long long coresPerSocket = 0;
     virCPUDefPtr cpu = NULL;
@@ -1504,8 +1503,6 @@ virVMXParseConfig(virVMXContext *ctx,
         const char *current = sched_cpu_affinity;
         int number, count = 0;

-        cpumasklen = 0;
-
         def->cpumask = virBitmapNew(VIR_DOMAIN_CPUMASK_LEN);
         if (!def->cpumask)
             goto cleanup;
@@ -1530,9 +1527,6 @@ virVMXParseConfig(virVMXContext *ctx,
                 goto cleanup;
             }

-            if (number + 1 > cpumasklen)
-                cpumasklen = number + 1;
-
             ignore_value(virBitmapSetBit(def->cpumask, number));
             ++count;

-- 
2.20.1

--
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]

  Powered by Linux