[PATCH] erofs-utils: fix BUILD_BUG_ON
Gao Xiang
hsiangkao at aol.com
Sun Jan 31 21:09:15 AEDT 2021
On Sun, Jan 31, 2021 at 05:47:32PM +0800, Hu Weiwen wrote:
> Signed-off-by: Hu Weiwen <sehuww at mail.scut.edu.cn>
Reviewed-by: Gao Xiang <hsiangkao at aol.com>
Thanks,
Gao Xiang
> ---
> 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