summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-05-03 11:25:15 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-05-03 11:25:15 -0400
commit4119c22f29e3b8d9e73ca114f1ace52f48c77c58 (patch)
tree325e0df0610dd9cedaad3ff472eb4a2515d3294a /ext
parent7342715b9205d57c9a27158da9ee4b8e1be87841 (diff)
downloadmongo-4119c22f29e3b8d9e73ca114f1ace52f48c77c58.tar.gz
Minor KNF, whitespace cleanup.
Diffstat (limited to 'ext')
-rw-r--r--ext/compressors/zlib/zlib_compress.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/ext/compressors/zlib/zlib_compress.c b/ext/compressors/zlib/zlib_compress.c
index 4bb26d51c84..e5a313627a5 100644
--- a/ext/compressors/zlib/zlib_compress.c
+++ b/ext/compressors/zlib/zlib_compress.c
@@ -68,14 +68,14 @@ typedef struct {
*/
static int
zlib_error(
- WT_COMPRESSOR *compressor, WT_SESSION *session, const char *call, int zret)
+ WT_COMPRESSOR *compressor, WT_SESSION *session, const char *call, int error)
{
WT_EXTENSION_API *wt_api;
wt_api = ((ZLIB_COMPRESSOR *)compressor)->wt_api;
(void)wt_api->err_printf(wt_api, session,
- "zlib error: %s: %s: %d", call, zError(zret), zret);
+ "zlib error: %s: %s: %d", call, zError(error), error);
return (WT_ERROR);
}
@@ -267,8 +267,7 @@ zlib_compress_raw(WT_COMPRESSOR *compressor, WT_SESSION *session,
/* Save the stream state in case the chosen data doesn't fit. */
if ((ret = deflateCopy(&last_zs, &zs)) != Z_OK)
- return (zlib_error(
- compressor, session, "deflateCopy", ret));
+ return (zlib_error(compressor, session, "deflateCopy", ret));
/*
* Strategy: take the available output size and compress that much
@@ -410,8 +409,8 @@ zlib_add_compressor(WT_CONNECTION *connection, int raw, const char *name)
ZLIB_COMPRESSOR *zlib_compressor;
/*
- * There are two almost identical zlib compressors: one supporting raw
- * compression, and one without.
+ * There are two almost identical zlib compressors: one using raw
+ * compression to target a specific block size, and one without.
*/
if ((zlib_compressor = calloc(1, sizeof(ZLIB_COMPRESSOR))) == NULL)
return (errno);
@@ -426,13 +425,13 @@ zlib_add_compressor(WT_CONNECTION *connection, int raw, const char *name)
zlib_compressor->wt_api = connection->get_extension_api(connection);
/*
- * between 0-10: level: see zlib manual.
+ * Between 0-10: level: see zlib manual.
*/
zlib_compressor->zlib_level = Z_DEFAULT_COMPRESSION;
- /* Load the standard compressor. */
+ /* Load the compressor. */
return (connection->add_compressor(
- connection, name, &zlib_compressor->compressor, NULL));
+ connection, name, (WT_COMPRESSOR *)zlib_compressor, NULL));
}
int zlib_extension_init(WT_CONNECTION *, WT_CONFIG_ARG *);
@@ -440,8 +439,8 @@ int zlib_extension_init(WT_CONNECTION *, WT_CONFIG_ARG *);
/*
* zlib_extension_init --
* WiredTiger zlib compression extension - called directly when zlib
- * support is built in, or via wiredtiger_extension_init when zlib
- * support is included via extension loading.
+ * support is built in, or via wiredtiger_extension_init when zlib support
+ * is included via extension loading.
*/
int
zlib_extension_init(WT_CONNECTION *connection, WT_CONFIG_ARG *config)