]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
[linux-kernel] Fix assert definition
authorNick Terrell <terrelln@meta.com>
Tue, 7 Mar 2023 23:47:36 +0000 (15:47 -0800)
committerNick Terrell <nickrterrell@gmail.com>
Wed, 8 Mar 2023 00:53:36 +0000 (16:53 -0800)
Backport upstream fix of the assert definition. This code is currently unused, and can be enabled for testing, which is why it wasn't caught.

https://lore.kernel.org/lkml/20230129131436.1343228-1-j.neuschaefer@gmx.net/

contrib/linux-kernel/zstd_deps.h

index 925161416033878be4aa36095a1011fa4766c75e..670c5fa2a952d441f10d511e00d4230c2ee64b1f 100644 (file)
@@ -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 */