BAN: Add parenthesis in ASSERT macros
This commit is contained in:
parent
59abb5d344
commit
6ebfe05fce
|
@ -13,8 +13,8 @@
|
|||
|
||||
#define __ASSERT_BIN_OP(lhs, rhs, name, op) \
|
||||
do { \
|
||||
auto&& _lhs = lhs; \
|
||||
auto&& _rhs = rhs; \
|
||||
auto&& _lhs = (lhs); \
|
||||
auto&& _rhs = (rhs); \
|
||||
if (!(_lhs op _rhs)) \
|
||||
Kernel::panic(name "(" #lhs ", " #rhs ") ({} " #op " {}) failed", _lhs, _rhs); \
|
||||
} while (false)
|
||||
|
|
Loading…
Reference in New Issue