diff options
author | David Hows <howsdav@gmail.com> | 2017-05-17 13:55:05 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2017-05-17 13:55:05 +1000 |
commit | 216e12b6da26182ffc666d2958eba2ee7d5a715c (patch) | |
tree | 6d47a50d7eaa90ff850aed09ac3fe68f02542454 /ext | |
parent | e3c1f0012e3eac806a7b8e64cb4dee90aeab8eda (diff) | |
download | mongo-216e12b6da26182ffc666d2958eba2ee7d5a715c.tar.gz |
WT-3313 Replace calls to the deprecated LZ4_compress function (#3423)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/compressors/lz4/lz4_compress.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/compressors/lz4/lz4_compress.c b/ext/compressors/lz4/lz4_compress.c index e99d125b69f..279f0be6c36 100644 --- a/ext/compressors/lz4/lz4_compress.c +++ b/ext/compressors/lz4/lz4_compress.c @@ -54,8 +54,8 @@ typedef struct { /* * LZ4 decompression requires the exact compressed byte count returned by the - * LZ4_compress and LZ4_compress_destSize functions. WiredTiger doesn't track - * that value, store it in the destination buffer. + * LZ4_compress_default and LZ4_compress_destSize functions. WiredTiger doesn't + * track that value, store it in the destination buffer. * * Additionally, LZ4_compress_destSize may compress into the middle of a record, * and after decompression we return the length to the last record successfully @@ -137,11 +137,10 @@ lz4_compress(WT_COMPRESSOR *compressor, WT_SESSION *session, (void)compressor; /* Unused parameters */ (void)session; - (void)dst_len; /* Compress, starting after the prefix bytes. */ - lz4_len = LZ4_compress( - (const char *)src, (char *)dst + sizeof(LZ4_PREFIX), (int)src_len); + lz4_len = LZ4_compress_default((const char *)src, + (char *)dst + sizeof(LZ4_PREFIX), (int)src_len, (int)dst_len); /* * If compression succeeded and the compressed length is smaller than |