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

Peter Krempa posted 5 patches 6 years, 10 months ago
[libvirt] [PATCH 2/5] vmx: Remove unused variable in virVMXParseConfig
Posted by Peter Krempa 6 years, 10 months ago
cpumasklen is only ever written to. Remove it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 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@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/5] vmx: Remove unused variable in virVMXParseConfig
Posted by Ján Tomko 6 years, 10 months ago
On Wed, Apr 03, 2019 at 02:44:51PM +0200, Peter Krempa wrote:
>cpumasklen is only ever written to. Remove it.
>

Unused since ee7d23ba4b4d487f8ac078c66b743d93a24141c0

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

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list