|
From: | Thomas Huth |
Subject: | Re: [PATCH] multi-process: Avoid logical AND of mutually exclusive tests |
Date: | Sat, 8 May 2021 06:34:49 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 |
On 07/05/2021 17.53, Jagannathan Raman wrote:
Fixes an if statement that performs a logical AND of mutually exclusive tests Reported-by: Thomas Huth <thuth@redhat.com>
I just spotted the bug ticket on Launchpad :-) So whoever picks this patch up, please add this instead:
Buglink: https://bugs.launchpad.net/qemu/+bug/1926995 Reviewed-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; }
[Prev in Thread] | Current Thread | [Next in Thread] |