From 6ebfe05fce1cb955443efc02db3c1efd42338f99 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 25 Feb 2024 21:22:47 +0200 Subject: [PATCH] BAN: Add parenthesis in ASSERT macros --- BAN/include/BAN/Assert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BAN/include/BAN/Assert.h b/BAN/include/BAN/Assert.h index 139d33e8..53872aba 100644 --- a/BAN/include/BAN/Assert.h +++ b/BAN/include/BAN/Assert.h @@ -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)