diff options
author | Jonathan Neuschäfer | 2023-01-29 14:14:36 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-04-06 12:10:38 +0200 |
commit | 78b342f0cda74f20cea51f0f1e1e9565e3054ffc (patch) | |
tree | 5b7867e91915067c91ca8d2c7382f558a7175674 /lib | |
parent | 6beb32105eeafc399e684822d07674811e8da40c (diff) |
zstd: Fix definition of assert()
[ Upstream commit 6906598f1ce93761716d780b6e3f171e13f0f4ce ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zstd/common/zstd_deps.h | 2 |
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 */ |