summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorW. Felix Handte <w@felixhandte.com>2018-04-27 17:59:02 (GMT)
committerW. Felix Handte <w@felixhandte.com>2018-04-27 17:59:02 (GMT)
commit5076aa3e352ecbd67cd71314cb1fafcb319aed56 (patch)
treea889e69e2bde276d1fdd2d66ade1bdb5d7cb6b8b /lib
parent7d11e344130a16a529e3ee15a16a10f2e67faa3c (diff)
downloadlz4-5076aa3e352ecbd67cd71314cb1fafcb319aed56.zip
lz4-5076aa3e352ecbd67cd71314cb1fafcb319aed56.tar.gz
lz4-5076aa3e352ecbd67cd71314cb1fafcb319aed56.tar.bz2
Remove Redundant LZ4_resetStream() Call
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4frame.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c
index e2be990..c4e0ae0 100644
--- a/lib/lz4frame.c
+++ b/lib/lz4frame.c
@@ -457,7 +457,7 @@ struct LZ4F_CDict_s {
LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize)
{
const char* dictStart = (const char*)dictBuffer;
- LZ4F_CDict* cdict = (LZ4F_CDict*) malloc(sizeof(*cdict));
+ LZ4F_CDict* cdict = (LZ4F_CDict*) ALLOC(sizeof(*cdict));
if (!cdict) return NULL;
if (dictSize > 64 KB) {
dictStart += dictSize - 64 KB;
@@ -471,7 +471,6 @@ LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize)
return NULL;
}
memcpy(cdict->dictContent, dictStart, dictSize);
- LZ4_resetStream(cdict->fastCtx);
LZ4_loadDict (cdict->fastCtx, (const char*)cdict->dictContent, (int)dictSize);
LZ4_resetStreamHC(cdict->HCCtx, LZ4HC_CLEVEL_DEFAULT);
LZ4_loadDictHC(cdict->HCCtx, (const char*)cdict->dictContent, (int)dictSize);