From: Eric Biggers Date: Sat, 5 Jul 2014 02:11:12 +0000 (-0500) Subject: lzx-compress.c: Minor cleanups X-Git-Tag: v1.7.1~64 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=10be6c712f4f5f066458dbab11e81f8e64cd2324;hp=31786dbc470c919893bf4fc5cc91a0f73cbee720;ds=sidebyside lzx-compress.c: Minor cleanups --- diff --git a/src/lzx-compress.c b/src/lzx-compress.c index 49e11830..cdbb6369 100644 --- a/src/lzx-compress.c +++ b/src/lzx-compress.c @@ -279,7 +279,7 @@ struct lzx_lens { * * If a codeword has zero frequency, it must still be assigned some nonzero cost * --- generally a high cost, since even if it gets used in the next iteration, - * it probably will not be used very times. */ + * it probably will not be used very many times. */ struct lzx_costs { u8 main[LZX_MAINCODE_MAX_NUM_SYMBOLS]; u8 len[LZX_LENCODE_NUM_SYMBOLS]; @@ -2220,8 +2220,6 @@ lzx_create_compressor(size_t window_size, if (!lzx_window_size_valid(window_size)) return WIMLIB_ERR_INVALID_PARAM; - LZX_DEBUG("Allocating memory."); - ctx = CALLOC(1, sizeof(struct lzx_compressor)); if (ctx == NULL) goto oom; @@ -2262,7 +2260,7 @@ lzx_create_compressor(size_t window_size, min(params->alg_params.slow.nice_match_length, LZX_MAX_MATCH_LEN)) * sizeof(ctx->optimum[0])); - if (!ctx->optimum) + if (ctx->optimum == NULL) goto oom; }