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>
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);
}
}