zstd: use NULL instead of 0 for NULL pointer
PATCH 1/1 zstd: use NULL instead of 0 for NULL pointer
Use NULL instead of 0 for NULL pointer to fix the
following sparse warning:lib/zstd/compress/zstd_fast.c:726:28: sparse: warning: Using plain integer as NULL pointer
No functional changes intended.
Fixes 98988fc8e9ed ("zstd: import upstream v1.5.5")
Signed-off-by Min-Hua Chen <[email protected]>
--- lib/zstd/compress/zstd_fast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/zstd/compress/zstd_fast.c +2 -2
@@ -723,7 +723,7 @@ static size_t ZSTD_compressBlock_fast_extDict_generic(U32 offcode;const BYTE * match0;size_t mLength; -const BYTE * matchEnd =0 ;/* initialize to avoid warning, assert != 0 later */ +const BYTE * matchEnd =NULL ;/* initialize to avoid warning, assert != NULL later */ size_t step;const BYTE * nextStep;
@@ -895,7 +895,7 @@ static size_t ZSTD_compressBlock_fast_extDict_generic( _match:/* Requires: ip0, match0, offcode, matchEnd */ /* Count the forward length. */ -assert (matchEnd !=0 ); +assert (matchEnd !=NULL ); mLength +=ZSTD_count_2segments (ip0 + mLength, match0 + mLength, iend, matchEnd, prefixStart);ZSTD_storeSeq (seqStore, (size_t )(ip0 - anchor), anchor, iend, offcode, mLength);
Signature · 1 line
2.43.0