summaryrefslogtreecommitdiff
path: root/lib/zstd/common/zstd_deps.h
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2023-01-29 16:14:36 +0300
committerNick Terrell <terrelln@fb.com>2023-03-07 02:54:54 +0300
commit6906598f1ce93761716d780b6e3f171e13f0f4ce (patch)
tree35b69a9a62e0ec85af14d667b84d85aedd236a95 /lib/zstd/common/zstd_deps.h
parent038505c41f0aad26ef101f4f7f6e111531c3914f (diff)
downloadlinux-6906598f1ce93761716d780b6e3f171e13f0f4ce.tar.xz
zstd: Fix definition of assert()
assert(x) should emit a warning if x is false. WARN_ON(x) emits a warning if x is true. Thus, assert(x) should be defined as WARN_ON(!x) rather than WARN_ON(x). Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Nick Terrell <terrelln@fb.com>
Diffstat (limited to 'lib/zstd/common/zstd_deps.h')
-rw-r--r--lib/zstd/common/zstd_deps.h2
1 files changed, 1 insertions, 1 deletions
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 */