summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2018-09-18 00:22:07 (GMT)
committerYann Collet <cyan@fb.com>2018-09-18 00:31:57 (GMT)
commit6381d828fda08f9eb621265e6904d0b0dd400c31 (patch)
tree548cdca6c7632621c5bbc9c85c0e04c1d5d40202 /lib/lz4.c
parent7b9edd60a06072f3c69f800e59e97f788d639934 (diff)
downloadlz4-6381d828fda08f9eb621265e6904d0b0dd400c31.zip
lz4-6381d828fda08f9eb621265e6904d0b0dd400c31.tar.gz
lz4-6381d828fda08f9eb621265e6904d0b0dd400c31.tar.bz2
increase size of LZ4 contexts for 128-bit systems
Diffstat (limited to 'lib/lz4.c')
-rw-r--r--lib/lz4.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 66a0898..89be891 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1747,12 +1747,13 @@ int LZ4_decompress_fast_doubleDict(const char* source, char* dest, int originalS
LZ4_streamDecode_t* LZ4_createStreamDecode(void)
{
LZ4_streamDecode_t* lz4s = (LZ4_streamDecode_t*) ALLOC_AND_ZERO(sizeof(LZ4_streamDecode_t));
+ LZ4_STATIC_ASSERT(LZ4_STREAMDECODESIZE >= sizeof(LZ4_streamDecode_t_internal)); /* A compilation error here means LZ4_STREAMDECODESIZE is not large enough */
return lz4s;
}
int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream)
{
- if (!LZ4_stream) return 0; /* support free on NULL */
+ if (LZ4_stream == NULL) return 0; /* support free on NULL */
FREEMEM(LZ4_stream);
return 0;
}