From 6516707cbe09db2414337cd5aa003b8cf9940ecf Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 18 Jan 2012 10:38:01 +0100 Subject: [PATCH 07/52] vl.c: Remove dead assignment RH-Author: Markus Armbruster 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 RH-Acked-by: Miroslav Rezanina RH-Acked-by: Amit Shah From: Amit Shah clang-analyzer pointed out the value of 'sockets' is never reused. Signed-off-by: Amit Shah CC: Andre Przywara Signed-off-by: Anthony Liguori (cherry picked from commit 5cdc9b76e34d06857ee8d03ea70e8793b8af06e1) Signed-off-by: Markus Armbruster --- vl.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) Signed-off-by: Michal Novotny --- 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