[PATCH] zstd: fix assert() logic
Enrico Scholz
enrico.scholz at sigma-chemnitz.de
Tue Sep 27 10:22:17 PDT 2022
It should warn when condition does **not** hold
Signed-off-by: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
---
lib/zstd/common/zstd_deps.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/zstd/common/zstd_deps.h b/lib/zstd/common/zstd_deps.h
index 7a5bf44839c9..f06df065dec0 100644
--- a/lib/zstd/common/zstd_deps.h
+++ b/lib/zstd/common/zstd_deps.h
@@ -84,7 +84,7 @@ static uint64_t ZSTD_div64(uint64_t dividend, uint32_t divisor) {
#include <linux/kernel.h>
-#define assert(x) WARN_ON((x))
+#define assert(x) WARN_ON(!(x))
#endif /* ZSTD_DEPS_ASSERT */
#endif /* ZSTD_DEPS_NEED_ASSERT */
--
2.37.3
More information about the barebox
mailing list