aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2025-03-17 13:20:49 +1000
committerNicholas Piggin <npiggin@gmail.com>2025-03-20 19:57:43 +1000
commite0b9357337e4005d7915d8c746eb3ce66c61fac0 (patch)
tree89ab81d566998f434822ea2956bd28d4c0fb5a35
parent344921309d933547974c2e85c52e2294513d9c45 (diff)
downloadqemu-e0b9357337e4005d7915d8c746eb3ce66c61fac0.zip
qemu-e0b9357337e4005d7915d8c746eb3ce66c61fac0.tar.gz
qemu-e0b9357337e4005d7915d8c746eb3ce66c61fac0.tar.bz2
ppc/xive2: Fix logical / bitwise comparison typo
The comparison as written is always false (perhaps confusingly, because the functions/macros are not really booleans but return 0 or the tested bit value). Change to use logical-and. Resolves: Coverity CID 1593721 Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
-rw-r--r--hw/intc/xive2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c
index 311b42e..7d584df 100644
--- a/hw/intc/xive2.c
+++ b/hw/intc/xive2.c
@@ -1344,7 +1344,7 @@ static void xive2_router_end_notify(Xive2Router *xrtr, uint8_t end_blk,
return;
}
- if (xive2_end_is_crowd(&end) & !xive2_end_is_ignore(&end)) {
+ if (xive2_end_is_crowd(&end) && !xive2_end_is_ignore(&end)) {
qemu_log_mask(LOG_GUEST_ERROR,
"XIVE: invalid END, 'crowd' bit requires 'ignore' bit\n");
return;