aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2010-01-13 16:24:42 +0530
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-13 17:14:15 -0600
commit5cdc9b76e34d06857ee8d03ea70e8793b8af06e1 (patch)
tree1303dfbf69ca330e93301a6728d0419fe738a7d5 /vl.c
parent347ed55cd109864b02dd29bb7e6cda1622e8019e (diff)
downloadqemu-5cdc9b76e34d06857ee8d03ea70e8793b8af06e1.zip
qemu-5cdc9b76e34d06857ee8d03ea70e8793b8af06e1.tar.gz
qemu-5cdc9b76e34d06857ee8d03ea70e8793b8af06e1.tar.bz2
vl.c: Remove dead assignment
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>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/vl.c b/vl.c
index df2a278..06cb40d 100644
--- 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);
}
}