Skip to content

Commit

Permalink
lib/lz4/lz4_decompress.c: document deliberate use of `&'
Browse files Browse the repository at this point in the history
This operation was intentional, but tools such as smatch will warn that it
might not have been.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Yann Collet <cyan@fb.com>
Cc: Vasily Averin <vvs@virtuozzo.com>
Cc: Gao Xiang <hsiangkao@aol.com>
Link: http://lkml.kernel.org/r/3bf931c6ea0cae3e23f3485801986859851b4f04.camel@perches.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: wulan17 <wulan17@nusantararom.org>
  • Loading branch information
JoePerches authored and Hadenix committed Feb 2, 2024
1 parent 589a88b commit 98e1343
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/lz4/lz4_decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ static FORCE_INLINE int LZ4_decompress_generic(
* space in the output for those 18 bytes earlier, upon
* entering the shortcut (in other words, there is a
* combined check for both stages).
*
* The & in the likely() below is intentionally not && so that
* some compilers can produce better parallelized runtime code
*/
if ((endOnInput ? length != RUN_MASK : length <= 8)
/*
Expand Down

0 comments on commit 98e1343

Please sign in to comment.