[PATCH] erofs-utils: fix BUILD_BUG_ON
    Hu Weiwen 
    sehuww at mail.scut.edu.cn
       
    Sun Jan 31 20:47:32 AEDT 2021
    
    
  
Signed-off-by: Hu Weiwen <sehuww at 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
    
    
More information about the Linux-erofs
mailing list