From 6516707cbe09db2414337cd5aa003b8cf9940ecf Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru@redhat.com>
Date: Wed, 18 Jan 2012 10:38:01 +0100
Subject: [PATCH 07/52] vl.c: Remove dead assignment

RH-Author: Markus Armbruster <armbru@redhat.com>
Message-id: <1326883126-22053-8-git-send-email-armbru@redhat.com>
Patchwork-id: 36602
O-Subject: [RHEL-6.3 PATCH qemu-kvm 07/52] vl.c: Remove dead assignment
Bugzilla: 758194
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Amit Shah <amit.shah@redhat.com>

From: Amit Shah <amit.shah@redhat.com>

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>
(cherry picked from commit 5cdc9b76e34d06857ee8d03ea70e8793b8af06e1)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 vl.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 vl.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/vl.c b/vl.c
index c96182b..05e68a6 100644
--- a/vl.c
+++ b/vl.c
@@ -2432,17 +2432,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);
             }
         }
-- 
1.7.7.5

