[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] multi-process: Avoid logical AND of mutually exclusive tests
From: |
Jagannathan Raman |
Subject: |
[PATCH] multi-process: Avoid logical AND of mutually exclusive tests |
Date: |
Fri, 7 May 2021 11:53:23 -0400 |
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
- [PATCH] multi-process: Avoid logical AND of mutually exclusive tests,
Jagannathan Raman <=