diff options
author | Jagannathan Raman <jag.raman@oracle.com> | 2021-05-07 11:53:23 -0400 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-05-13 18:15:32 +0200 |
commit | dcf20655ffca2b0219d2914db4aadcce4b61fa0a (patch) | |
tree | 4ea8d96e1c82597b4f26c750e5927f526cd46cb5 /hw/remote | |
parent | 4872fdf71b52288105ae5513f892f39633bec28c (diff) |
multi-process: Avoid logical AND of mutually exclusive tests
Fixes an if statement that performs a logical AND of mutually exclusive
tests
Buglink: https://bugs.launchpad.net/qemu/+bug/1926995
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <1620402803-9237-1-git-send-email-jag.raman@oracle.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/remote')
-rw-r--r-- | hw/remote/mpqemu-link.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/remote/mpqemu-link.c b/hw/remote/mpqemu-link.c index 9ce31526e8..e67a5de72c 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; } |