From d7399232a4d547d7183c193997e17d534d000f52 Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Wed, 5 Aug 2020 12:46:32 -0400 Subject: [PATCH] Remove Extraneous Reset in LZ4_attach_dictionary() Nothing internally sets dirty anymore. The only way to get that is if you use an uninitialized context, in which case your warranty is void anyways. --- lib/lz4.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/lz4.c b/lib/lz4.c index ae50d54..46c8e11 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -1455,12 +1455,6 @@ void LZ4_attach_dictionary(LZ4_stream_t* workingStream, const LZ4_stream_t* dict workingStream, dictionaryStream, dictCtx != NULL ? dictCtx->dictSize : 0); - /* Calling LZ4_resetStream_fast() here makes sure that changes will not be - * erased by subsequent calls to LZ4_resetStream_fast() in case stream was - * marked as having dirty context, e.g. requiring full reset. - */ - LZ4_resetStream_fast(workingStream); - if (dictCtx != NULL) { /* If the current offset is zero, we will never look in the * external dictionary context, since there is no value a table -- 2.7.4