From 01cef9b928ed1bf88c9b48062b074582a6dffec2 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Mon, 17 Oct 2022 14:51:59 -0700 Subject: [PATCH] [typo] Fix a double word in comments Backport two parts of https://github.com/facebook/zstd/commit/b772f53952fa167e3c8d5630b26397e8d4fb4c5b that were also reported on the LKML. Reported-by: Slark Xiao Reported-by: Xin Gao Reported-by: Jilin Yuan --- lib/compress/zstd_compress.c | 2 +- lib/decompress/zstd_decompress.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index f06456af9..b6311449b 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -5764,7 +5764,7 @@ ZSTD_validateSequence(U32 offCode, U32 matchLength, size_t posInSrc, U32 windowLog, size_t dictSize) { U32 const windowSize = 1 << windowLog; - /* posInSrc represents the amount of data the the decoder would decode up to this point. + /* posInSrc represents the amount of data the decoder would decode up to this point. * As long as the amount of data decoded is less than or equal to window size, offsets may be * larger than the total length of output decoded in order to reference the dict, even larger than * window size. After output surpasses windowSize, we're limited to windowSize offsets again. diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c index 0031e98cf..be55989ee 100644 --- a/lib/decompress/zstd_decompress.c +++ b/lib/decompress/zstd_decompress.c @@ -1108,7 +1108,7 @@ size_t ZSTD_decompress(void* dst, size_t dstCapacity, const void* src, size_t sr size_t ZSTD_nextSrcSizeToDecompress(ZSTD_DCtx* dctx) { return dctx->expected; } /** - * Similar to ZSTD_nextSrcSizeToDecompress(), but when when a block input can be streamed, + * Similar to ZSTD_nextSrcSizeToDecompress(), but when a block input can be streamed, * we allow taking a partial block as the input. Currently only raw uncompressed blocks can * be streamed. *