pike.git / src / modules / Gz / zlibmod.c

version» Context lines:

pike.git/src/modules/Gz/zlibmod.c:353: Inside #if defined(Z_FIXED)
  #endif   #ifdef Z_FIXED    strategy != Z_FIXED &&   #endif    strategy != Z_HUFFMAN_ONLY)    Pike_error("Invalid compression strategy %d for pack.\n", strategy);       if( wbits<0 ? (wbits<-15 || wbits>-8) : (wbits<8 || wbits>15 ) )    Pike_error("Invalid window size value %d for pack.\n", wbits);    -  MEMSET(&z, 0, sizeof(z)); +  memset(&z, 0, sizeof(z));    z.gz.zalloc = Z_NULL;    z.gz.zfree = Z_NULL;       z.gz.next_in = (Bytef *)data->str;    z.gz.avail_in = (unsigned INT32)(data->len);       do {    ret = deflateInit2(&z.gz, level, Z_DEFLATED, wbits, 9, strategy);    if (ret == Z_STREAM_ERROR) {    /* zlib 1.1.4's deflateInit2() only supports wbits 9..15 (not 8). */
pike.git/src/modules/Gz/zlibmod.c:594:       pop_n_elems(args);       push_string(low_free_buf(&buf));   }         static void init_gz_deflate(struct object *UNUSED(o))   {    mt_init(& THIS->lock); -  MEMSET(& THIS->gz, 0, sizeof(THIS->gz)); +  memset(& THIS->gz, 0, sizeof(THIS->gz));    THIS->gz.zalloc=Z_NULL;    THIS->gz.zfree=Z_NULL;    THIS->gz.opaque=(void *)THIS;    THIS->state=0;    deflateInit(& THIS->gz, THIS->level = Z_DEFAULT_COMPRESSION);    THIS->epilogue = NULL;   }      static void exit_gz_deflate(struct object *UNUSED(o))   {
pike.git/src/modules/Gz/zlibmod.c:823:    CALL_AND_UNSET_ONERROR (uwp);   #endif    return fail;   }      void zlibmod_unpack(struct pike_string *data, dynamic_buffer *buf, int raw)   {    struct zipper z;    int ret;    -  MEMSET(&z, 0, sizeof(z)); +  memset(&z, 0, sizeof(z));    z.gz.zalloc = Z_NULL;    z.gz.zfree = Z_NULL;       z.gz.next_in=(Bytef *)data->str;    z.gz.avail_in = DO_NOT_WARN((unsigned INT32)(data->len));       if( raw )    ret = inflateInit2(&z.gz, -15);    else    ret = inflateInit( &z.gz );
pike.git/src/modules/Gz/zlibmod.c:1017:    pop_n_elems(args);    if(this->epilogue)    ref_push_string(this->epilogue);    else    push_int(0);   }      static void init_gz_inflate(struct object *UNUSED(o))   {    mt_init(& THIS->lock); -  MEMSET(& THIS->gz, 0, sizeof(THIS->gz)); +  memset(& THIS->gz, 0, sizeof(THIS->gz));    THIS->gz.zalloc=Z_NULL;    THIS->gz.zfree=Z_NULL;    THIS->gz.opaque=(void *)THIS;    inflateInit(&THIS->gz);    inflateEnd(&THIS->gz);    THIS->epilogue = NULL;   }      static void exit_gz_inflate(struct object *UNUSED(o))   {
pike.git/src/modules/Gz/zlibmod.c:1128: Inside #if defined(HAVE_ZLIB_H)
   ADD_FUNCTION("_size_object", gz_deflate_size, tFunc(tVoid,tInt), 0);       add_integer_constant("NO_FLUSH",Z_NO_FLUSH,0);    add_integer_constant("PARTIAL_FLUSH",Z_PARTIAL_FLUSH,0);    add_integer_constant("SYNC_FLUSH",Z_SYNC_FLUSH,0);    add_integer_constant("FINISH",Z_FINISH,0);    add_integer_constant("DEFAULT_STRATEGY", Z_DEFAULT_STRATEGY,0);    add_integer_constant("FILTERED", Z_FILTERED,0);    add_integer_constant("HUFFMAN_ONLY", Z_HUFFMAN_ONLY,0);    -  MEMSET(&z, 0, sizeof(z)); +  memset(&z, 0, sizeof(z));   #ifdef Z_RLE    if (deflateInit2(&z, 8, Z_DEFLATED, 9, 9, Z_RLE) == Z_OK) {    have_rle = 1;    deflateEnd(&z);    add_integer_constant("RLE", Z_RLE,0);    }   #endif   #ifdef Z_FIXED    if (deflateInit2(&z, 8, Z_DEFLATED, 9, 9, Z_FIXED) == Z_OK) {    have_fixed = 1;