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>
This commit is contained in:
Jagannathan Raman 2021-05-07 11:53:23 -04:00 committed by Laurent Vivier
parent 4872fdf71b
commit dcf20655ff
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}