[BACK]Return to zlib.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / cvs

Diff for /src/usr.bin/cvs/Attic/zlib.c between version 1.3 and 1.4

version 1.3, 2005/07/25 12:05:43 version 1.4, 2005/12/10 20:27:45
Line 60 
Line 60 
                 return (NULL);                  return (NULL);
         }          }
   
         ctx = (CVSZCTX *)malloc(sizeof(*ctx));          ctx = (CVSZCTX *)xmalloc(sizeof(*ctx));
         if (ctx == NULL) {          if (ctx == NULL) {
                 cvs_log(LP_ERRNO, "failed to allocate zlib context");                  cvs_log(LP_ERRNO, "failed to allocate zlib context");
                 return (NULL);                  return (NULL);
Line 79 
Line 79 
         if ((inflateInit(&(ctx->z_instrm)) != Z_OK) ||          if ((inflateInit(&(ctx->z_instrm)) != Z_OK) ||
             (deflateInit(&(ctx->z_destrm), level) != Z_OK)) {              (deflateInit(&(ctx->z_destrm), level) != Z_OK)) {
                 cvs_log(LP_ERR, "failed to initialize zlib streams");                  cvs_log(LP_ERR, "failed to initialize zlib streams");
                 free(ctx);                  xfree(ctx);
                 return (NULL);                  return (NULL);
         }          }
   
Line 98 
Line 98 
         if (ctx != NULL) {          if (ctx != NULL) {
                 (void)inflateEnd(&(ctx->z_instrm));                  (void)inflateEnd(&(ctx->z_instrm));
                 (void)deflateEnd(&(ctx->z_destrm));                  (void)deflateEnd(&(ctx->z_destrm));
                 free(ctx);                  xfree(ctx);
         }          }
 }  }
   

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4