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 <andrew.goodbody@linaro.org>
This commit is contained in:
Andrew Goodbody 2025-07-23 11:34:36 +01:00 committed by Tom Rini
parent 4b8aba93bd
commit 0fdcca86d8

View File

@ -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: