[PATCH] zstd: use NULL instead of 0 for NULL pointer
From: Min-Hua Chen
Date: Mon Sep 09 2024 - 17:38:46 EST
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 <minhuadotchen@xxxxxxxxx>
---
lib/zstd/compress/zstd_fast.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/zstd/compress/zstd_fast.c b/lib/zstd/compress/zstd_fast.c
index 3399b39c5dbc..b0dbe0db3310 100644
--- a/lib/zstd/compress/zstd_fast.c
+++ b/lib/zstd/compress/zstd_fast.c
@@ -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);
--
2.43.0