mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] zstd: fix assert() logic
@ 2022-09-27 17:22 Enrico Scholz
  2022-09-28  9:11 ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Enrico Scholz @ 2022-09-27 17:22 UTC (permalink / raw)
  To: barebox; +Cc: Enrico Scholz

It should warn when condition does **not** hold

Signed-off-by: Enrico Scholz <enrico.scholz@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




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

end of thread, other threads:[~2022-09-28  9:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 17:22 [PATCH] zstd: fix assert() logic Enrico Scholz
2022-09-28  9:11 ` Sascha Hauer
2022-09-28  9:29   ` Enrico Scholz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox