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>
This commit is contained in:
Amit Shah 2010-01-13 16:24:42 +05:30 committed by Anthony Liguori
parent 347ed55cd1
commit 5cdc9b76e3
1 changed files with 1 additions and 5 deletions

6
vl.c
View File

@ -2403,17 +2403,13 @@ static void smp_parse(const char *optarg)
threads = threads > 0 ? threads : 1; threads = threads > 0 ? threads : 1;
if (smp == 0) { if (smp == 0) {
smp = cores * threads * sockets; smp = cores * threads * sockets;
} else {
sockets = smp / (cores * threads);
} }
} else { } else {
if (cores == 0) { if (cores == 0) {
threads = threads > 0 ? threads : 1; threads = threads > 0 ? threads : 1;
cores = smp / (sockets * threads); cores = smp / (sockets * threads);
} else { } else {
if (sockets == 0) { if (sockets) {
sockets = smp / (cores * threads);
} else {
threads = smp / (cores * sockets); threads = smp / (cores * sockets);
} }
} }