qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/6] vl.c: Remove dead assignment


From: Amit Shah
Subject: [Qemu-devel] [PATCH 1/6] vl.c: Remove dead assignment
Date: Wed, 13 Jan 2010 16:24:42 +0530

clang-analyzer pointed out the value of 'sockets' is never reused.

Signed-off-by: Amit Shah <address@hidden>
CC: Andre Przywara <address@hidden>
---
 vl.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/vl.c b/vl.c
index b048e89..e49e7bd 100644
--- a/vl.c
+++ b/vl.c
@@ -2613,17 +2613,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.6.2.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]