linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] erofs-utils: fix BUILD_BUG_ON
@ 2021-01-31  9:47 Hu Weiwen
  2021-01-31 10:09 ` Gao Xiang via Linux-erofs
  2021-02-06 13:55 ` Li GuiFu via Linux-erofs
  0 siblings, 2 replies; 3+ messages in thread
From: Hu Weiwen @ 2021-01-31  9:47 UTC (permalink / raw)
  To: Gao Xiang, linux-erofs

Signed-off-by: Hu Weiwen <sehuww@mail.scut.edu.cn>
---
 include/erofs/defs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/erofs/defs.h b/include/erofs/defs.h
index b54cd9d..2e40944 100644
--- a/include/erofs/defs.h
+++ b/include/erofs/defs.h
@@ -87,7 +87,7 @@ typedef int64_t         s64;
 #ifndef __OPTIMIZE__
 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2 * !!(condition)]))
 #else
-#define BUILD_BUG_ON(condition) assert(condition)
+#define BUILD_BUG_ON(condition) assert(!(condition))
 #endif
 
 #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-06 14:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-31  9:47 [PATCH] erofs-utils: fix BUILD_BUG_ON Hu Weiwen
2021-01-31 10:09 ` Gao Xiang via Linux-erofs
2021-02-06 13:55 ` Li GuiFu via Linux-erofs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).