From 0fdcca86d87b3b723cdfc9901f02f14adba9df60 Mon Sep 17 00:00:00 2001 From: Andrew Goodbody Date: Wed, 23 Jul 2025 11:34:36 +0100 Subject: [PATCH] bios_emulator: Add parens to xorl macro The xorl macro lacked surrounding parens which meant that it could have unexpected results when used in expressions. Fix this by adding the surrounding parens to make its use predictable. This issue was found by Smatch. Signed-off-by: Andrew Goodbody --- drivers/bios_emulator/x86emu/ops2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bios_emulator/x86emu/ops2.c b/drivers/bios_emulator/x86emu/ops2.c index 1ff27b2af95..29a166f7fe9 100644 --- a/drivers/bios_emulator/x86emu/ops2.c +++ b/drivers/bios_emulator/x86emu/ops2.c @@ -66,7 +66,7 @@ void x86emuOp2_illegal_op( END_OF_INSTR(); } -#define xorl(a,b) ((a) && !(b)) || (!(a) && (b)) +#define xorl(a, b) (((a) && !(b)) || (!(a) && (b))) /**************************************************************************** REMARKS: