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