Fix ASSERT() macro with '%' in the expression

Fix a compiling error triggered by ASSERT(exp), when exp contains '%'

(e.g. integer modular operator)

Signed-off-by: Robin Hsu <robinhsu@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Robin Hsu 2020-11-04 11:13:08 +08:00 committed by Jaegeuk Kim
parent ca0ed8a66f
commit 4bd7008291

View File

@ -194,8 +194,8 @@ static inline uint64_t bswap_64(uint64_t val)
#define ASSERT(exp) \
do { \
if (!(exp)) { \
printf("[ASSERT] (%s:%4d) " #exp"\n", \
__func__, __LINE__); \
printf("[ASSERT] (%s:%4d) %s\n", \
__func__, __LINE__, #exp); \
exit(-1); \
} \
} while (0)