]> git.proxmox.com Git - qemu.git/commitdiff
vl.c: Remove dead assignment
authorAmit Shah <amit.shah@redhat.com>
Wed, 13 Jan 2010 10:54:42 +0000 (16:24 +0530)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 13 Jan 2010 23:14:15 +0000 (17:14 -0600)
clang-analyzer pointed out the value of 'sockets' is never reused.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c

diff --git a/vl.c b/vl.c
index df2a27819e3aec17f1d3e95d0b23f69792c46ec3..06cb40df5cbdf7072c7622652a04f4cb5c6ef48c 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2403,17 +2403,13 @@ static void smp_parse(const char *optarg)
         threads = threads > 0 ? threads : 1;
         if (smp == 0) {
             smp = cores * threads * sockets;
-        } else {
-            sockets = smp / (cores * threads);
         }
     } else {
         if (cores == 0) {
             threads = threads > 0 ? threads : 1;
             cores = smp / (sockets * threads);
         } else {
-            if (sockets == 0) {
-                sockets = smp / (cores * threads);
-            } else {
+            if (sockets) {
                 threads = smp / (cores * sockets);
             }
         }