[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 6 Jun 2020 16:28:02 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: linux-kernel@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Gao Xiang <xiang@...nel.org>
Subject: [PATCH] lib/lz4: smatch warning in LZ4_decompress_generic()
Found by smatch:
lib/lz4/lz4_decompress.c:150 LZ4_decompress_generic() warn: maybe use && instead of &
It was realy incorrectly copied from
https://github.com/lz4/lz4/commit/45f8603aae389d34c689d3ff7427b314071ccd2c
line 1431
Fixes: 2209fda323e2 ("lib/lz4: update LZ4 decompressor module")
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
---
lib/lz4/lz4_decompress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c
index 0c9d3ad..f7f7dca 100644
--- a/lib/lz4/lz4_decompress.c
+++ b/lib/lz4/lz4_decompress.c
@@ -147,7 +147,7 @@ static FORCE_INLINE int LZ4_decompress_generic(
* strictly "less than" on input, to re-enter
* the loop with at least one byte
*/
- && likely((endOnInput ? ip < shortiend : 1) &
+ && likely((endOnInput ? ip < shortiend : 1) &&
(op <= shortoend))) {
/* Copy the literals */
memcpy(op, ip, endOnInput ? 16 : 8);
--
1.8.3.1
Powered by blists - more mailing lists