summaryrefslogtreecommitdiff
path: root/ext/compressors
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-03-18 11:22:51 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-03-18 11:22:51 -0400
commitc0e079f7e626022dc60ef87900ef7cb78c7d3f50 (patch)
tree6f2df0b404d1528eaec12aca5536f1adaa07e72e /ext/compressors
parent4b01b25210f573b1c8ff1ee0c09c306ed143c4fb (diff)
downloadmongo-c0e079f7e626022dc60ef87900ef7cb78c7d3f50.tar.gz
Don't write out the error value twice in a row.
Minor lint cleanup to match LZ4 APIs.
Diffstat (limited to 'ext/compressors')
-rw-r--r--ext/compressors/lz4/lz4_compress.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/compressors/lz4/lz4_compress.c b/ext/compressors/lz4/lz4_compress.c
index 485c930a415..37c5060c976 100644
--- a/ext/compressors/lz4/lz4_compress.c
+++ b/ext/compressors/lz4/lz4_compress.c
@@ -58,8 +58,8 @@ wt_lz4_error(
wt_api = ((LZ4_COMPRESSOR *)compressor)->wt_api;
- (void)wt_api->err_printf(wt_api, session,
- "lz4 error: %s: %d: %d", call, zret, zret);
+ (void)wt_api->err_printf(wt_api,
+ session, "lz4 error: %s: %d", call, zret);
return (WT_ERROR);
}
@@ -86,7 +86,7 @@ wt_lz4_compress(WT_COMPRESSOR *compressor, WT_SESSION *session,
/* Store the length of the compressed block in the first 8 bytes */
lz4buf = (char *)dst + sizeof(size_t);
- lz4_len = (size_t)LZ4_compress((const char *)src, lz4buf, src_len);
+ lz4_len = (size_t)LZ4_compress((const char *)src, lz4buf, (int)src_len);
/*
* Flag no-compression if the result was larger than the original
@@ -143,7 +143,7 @@ wt_lz4_decompress(WT_COMPRESSOR *compressor, WT_SESSION *session,
* wiredtiger keeps track of the byte count before compression
*/
decoded = LZ4_decompress_safe(
- compressed_data, (char *)dst, src_data_len, dst_len);
+ compressed_data, (char *)dst, (int)src_data_len, (int)dst_len);
if (decoded < 0)
return (wt_lz4_error(compressor, session,