]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
ppc/xive2: Fix logical / bitwise comparison typo
authorNicholas Piggin <npiggin@gmail.com>
Mon, 17 Mar 2025 03:20:49 +0000 (13:20 +1000)
committerNicholas Piggin <npiggin@gmail.com>
Thu, 20 Mar 2025 09:57:43 +0000 (19:57 +1000)
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>
hw/intc/xive2.c

index 311b42e15d388bfcce850e9742d7150a4325d036..7d584dfafafd9f9224fd68bd4851a5ee61109708 100644 (file)
@@ -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;