From 89556f5a2f64abcc6cecd3d412488e2ff6d6cd01 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Thu, 12 Jan 2012 03:11:31 +0600 Subject: [PATCH] zlib: C++ style fixes for dictionary --- src/node_zlib.cc | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/node_zlib.cc b/src/node_zlib.cc index a597ffa..95c42ba 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -166,15 +166,13 @@ template class ZCtx : public ObjectWrap { assert(ctx->dictionary_ != NULL && "Stream has no dictionary"); // Load it - err = inflateSetDictionary( - &(ctx->strm_), - ctx->dictionary_, - ctx->dictionary_len_ - ); + err = inflateSetDictionary(&ctx->strm_, + ctx->dictionary_, + ctx->dictionary_len_); assert(err == Z_OK && "Failed to set dictionary"); // And try to decode again - err = inflate(&(ctx->strm_), ctx->flush_); + err = inflate(&ctx->strm_, ctx->flush_); } break; default: @@ -284,7 +282,7 @@ template class ZCtx : public ObjectWrap { case DEFLATE: case GZIP: case DEFLATERAW: - err = deflateInit2(&(ctx->strm_), + err = deflateInit2(&ctx->strm_, ctx->level_, Z_DEFLATED, ctx->windowBits_, @@ -295,7 +293,7 @@ template class ZCtx : public ObjectWrap { case GUNZIP: case INFLATERAW: case UNZIP: - err = inflateInit2(&(ctx->strm_), ctx->windowBits_); + err = inflateInit2(&ctx->strm_, ctx->windowBits_); break; default: assert(0 && "wtf?"); @@ -310,11 +308,9 @@ template class ZCtx : public ObjectWrap { switch (mode) { case DEFLATE: case DEFLATERAW: - err = deflateSetDictionary( - &(ctx->strm_), - ctx->dictionary_, - dictionary_len - ); + err = deflateSetDictionary(&ctx->strm_, + ctx->dictionary_, + dictionary_len); break; default: break; -- 2.7.4