From: Joel Schopp <jschopp@austin.ibm.com>
To: qemu-devel@nongnu.org
Cc: Joel Schopp <jschopp@austin.ibm.com>
Subject: [Qemu-devel] [PATCH 3/3] remove pointless if from vl.c
Date: Wed, 21 Jul 2010 15:05:17 -0500 [thread overview]
Message-ID: <1279742717-10804-4-git-send-email-jschopp@austin.ibm.com> (raw)
In-Reply-To: <1279742717-10804-1-git-send-email-jschopp@austin.ibm.com>
We already set sockets to nonzero in the code above.
So this if statement always evaluates true. Remove it.
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
---
vl.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/vl.c b/vl.c
index 8a5de9f..a0c28b6 100644
--- a/vl.c
+++ b/vl.c
@@ -801,9 +801,7 @@ static void smp_parse(const char *optarg)
threads = threads > 0 ? threads : 1;
cores = smp / (sockets * threads);
} else {
- if (sockets) {
- threads = smp / (cores * sockets);
- }
+ threads = smp / (cores * sockets);
}
}
smp_cpus = smp;
--
1.7.0.4
next prev parent reply other threads:[~2010-07-21 20:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-21 20:05 [Qemu-devel] [PATCH 0/3] Fix broken if statements Joel Schopp
2010-07-21 20:05 ` [Qemu-devel] [PATCH 1/3] remove dead code from hw/loader.c Joel Schopp
2010-07-21 20:05 ` [Qemu-devel] [PATCH 2/3] fix variable type in qemu-io.c Joel Schopp
2010-07-21 20:05 ` Joel Schopp [this message]
2010-07-22 16:18 ` [Qemu-devel] [PATCH 0/3] Fix broken if statements Stefan Weil
2010-08-01 17:25 ` Andreas Färber
2010-08-01 20:20 ` Stefan Weil
2010-08-02 15:23 ` Joel Schopp
2010-07-30 21:06 ` Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1279742717-10804-4-git-send-email-jschopp@austin.ibm.com \
--to=jschopp@austin.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).