]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Set some parameters to zero before initializing cdict
authorStella Lau <laus@fb.com>
Mon, 21 Aug 2017 18:34:53 +0000 (11:34 -0700)
committerStella Lau <laus@fb.com>
Mon, 21 Aug 2017 18:35:46 +0000 (11:35 -0700)
lib/compress/zstd_compress.c

index 265be326f37f12e8a8056447adce2d5f0e7980bc..530611dd5a8aeb72c0eb7f4f5b5dcaa65a6a3d54 100644 (file)
@@ -3708,15 +3708,12 @@ ZSTD_CDict* ZSTD_createCDict_advanced_opaque(
 
     {   ZSTD_CDict* const cdict = (ZSTD_CDict*)ZSTD_malloc(sizeof(ZSTD_CDict), customMem);
         ZSTD_CCtx* const cctx = ZSTD_createCCtx_advanced(customMem);
-
         if (!cdict || !cctx) {
             ZSTD_free(cdict, customMem);
             ZSTD_freeCCtx(cctx);
             return NULL;
         }
         cdict->refContext = cctx;
-
-        /* TODO: What should be zero? */
         if (ZSTD_isError( ZSTD_initCDict_internal_opaque(
                                         cdict,
                                         dictBuffer, dictSize,
@@ -4256,7 +4253,7 @@ size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuf
     return ZSTD_compressStream_generic(zcs, output, input, ZSTD_e_continue);
 }
 
-/*! ZSTDMT_initCStream_internal() :
+/*! ZSTDMT_initCStream_internal_opaque() :
  *  Private use only. Init streaming operation.
  *  expects params to be valid.
  *  must receive dict, or cdict, or none, but not both.