aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Hsu <robinhsu@google.com>2020-11-04 11:13:08 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-12-07 09:25:14 -0800
commit4bd700829123e5d30603cc43c13be1aa35873340 (patch)
treeff7aa41d7dbd3fff09bee797f30124392400d1c1
parentca0ed8a66fb43f9616def645c00f1f55f01582ec (diff)
downloadf2fs-tools-4bd700829123e5d30603cc43c13be1aa35873340.tar.gz
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>
-rw-r--r--include/f2fs_fs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index b5bda13..1348e39 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -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)