From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV0tR-0001CN-5t for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:56:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV0tM-0001A5-FN for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:56:04 -0500 Received: from [199.232.76.173] (port=35077 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV0tM-00019y-4C for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:56:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10374) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NV0tL-0004J3-Hl for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:55:59 -0500 From: Amit Shah Date: Wed, 13 Jan 2010 16:24:42 +0530 Message-Id: <1263380087-31821-2-git-send-email-amit.shah@redhat.com> In-Reply-To: <1263380087-31821-1-git-send-email-amit.shah@redhat.com> References: <1263380087-31821-1-git-send-email-amit.shah@redhat.com> Subject: [Qemu-devel] [PATCH 1/6] vl.c: Remove dead assignment List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Amit Shah , Andre Przywara clang-analyzer pointed out the value of 'sockets' is never reused. Signed-off-by: Amit Shah CC: Andre Przywara --- 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