diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2014-01-23 17:08:37 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2014-01-23 17:08:37 +1100 |
commit | e5f49efea1b957219dcbd792afc5039adc7454d2 (patch) | |
tree | cd09bdb66f1f8459208c1c3ad3b2b413e6be350c /ext/compressors | |
parent | 4b579d5fdfc996926c3888cccca4973eaffd8fcc (diff) | |
download | mongo-e5f49efea1b957219dcbd792afc5039adc7454d2.tar.gz |
Fix some nits in the zlib compress implementation.
Diffstat (limited to 'ext/compressors')
-rw-r--r-- | ext/compressors/zlib/zlib_compress.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/ext/compressors/zlib/zlib_compress.c b/ext/compressors/zlib/zlib_compress.c index e1a16fb9116..30d6ae84b27 100644 --- a/ext/compressors/zlib/zlib_compress.c +++ b/ext/compressors/zlib/zlib_compress.c @@ -38,14 +38,14 @@ static int zlib_compress(WT_COMPRESSOR *, WT_SESSION *, uint8_t *, size_t, uint8_t *, size_t, size_t *, int *); static int +zlib_compress_raw(WT_COMPRESSOR *, WT_SESSION *, size_t, int, + size_t, uint8_t *, uint32_t *, uint32_t, uint8_t *, size_t, int, + size_t *, uint32_t *); +static int zlib_decompress(WT_COMPRESSOR *, WT_SESSION *, uint8_t *, size_t, uint8_t *, size_t, size_t *); static int zlib_terminate(WT_COMPRESSOR *, WT_SESSION *); -static int -zlib_compress_raw(WT_COMPRESSOR *, WT_SESSION *, size_t, int, - size_t, uint8_t *, uint32_t *, uint32_t, uint8_t *, size_t, int, - size_t *, uint32_t *); /* Local compressor structure. */ typedef struct { @@ -53,12 +53,12 @@ typedef struct { WT_EXTENSION_API *wt_api; /* Extension API */ - int zlib_level; /* Configuration */ + int zlib_level; /* Configuration */ } ZLIB_COMPRESSOR; /* * zlib gives us a cookie to pass to the underlying allocation functions; we - * we need two handles, package them up. + * need two handles, package them up. */ typedef struct { WT_COMPRESSOR *compressor; @@ -76,12 +76,7 @@ wiredtiger_extension_init(WT_CONNECTION *connection, WT_CONFIG_ARG *config) return (errno); zlib_compressor->compressor.compress = zlib_compress; -#if 1 zlib_compressor->compressor.compress_raw = zlib_compress_raw; -#else - (void)zlib_compress_raw; - zlib_compressor->compressor.compress_raw = NULL; -#endif zlib_compressor->compressor.decompress = zlib_decompress; zlib_compressor->compressor.pre_size = NULL; zlib_compressor->compressor.terminate = zlib_terminate; |