From: Jagannathan Raman <jag.raman@oracle.com>
To: qemu-devel@nongnu.org
Cc: elena.ufimtseva@oracle.com, john.g.johnson@oracle.com,
thuth@redhat.com, jag.raman@oracle.com, stefanha@redhat.com,
berrange@redhat.com
Subject: [PATCH] multi-process: Avoid logical AND of mutually exclusive tests
Date: Fri, 7 May 2021 11:53:23 -0400 [thread overview]
Message-ID: <1620402803-9237-1-git-send-email-jag.raman@oracle.com> (raw)
Fixes an if statement that performs a logical AND of mutually exclusive
tests
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
---
hw/remote/mpqemu-link.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/remote/mpqemu-link.c b/hw/remote/mpqemu-link.c
index 9ce3152..e67a5de 100644
--- a/hw/remote/mpqemu-link.c
+++ b/hw/remote/mpqemu-link.c
@@ -218,7 +218,7 @@ uint64_t mpqemu_msg_send_and_await_reply(MPQemuMsg *msg, PCIProxyDev *pdev,
bool mpqemu_msg_valid(MPQemuMsg *msg)
{
- if (msg->cmd >= MPQEMU_CMD_MAX && msg->cmd < 0) {
+ if (msg->cmd >= MPQEMU_CMD_MAX || msg->cmd < 0) {
return false;
}
--
1.8.3.1
next reply other threads:[~2021-05-07 15:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 15:53 Jagannathan Raman [this message]
2021-05-08 4:34 ` [PATCH] multi-process: Avoid logical AND of mutually exclusive tests Thomas Huth
2021-05-13 16:16 ` Laurent Vivier
2021-05-13 16:02 ` Stefan Hajnoczi
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=1620402803-9237-1-git-send-email-jag.raman@oracle.com \
--to=jag.raman@oracle.com \
--cc=berrange@redhat.com \
--cc=elena.ufimtseva@oracle.com \
--cc=john.g.johnson@oracle.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
/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).