From: Andrew Goodbody Date: Wed, 23 Jul 2025 10:34:36 +0000 (+0100) Subject: bios_emulator: Add parens to xorl macro X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fdcca86d87b3b723cdfc9901f02f14adba9df60;p=thirdparty%2Fu-boot.git 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 --- 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: