if (s->mode == 'w') { #ifdef NO_DEFLATE err = Z_STREAM_ERROR; #else err = deflateEnd(&(s->stream)); #endif } else if (s->mode == 'r') { err = inflateEnd(&(s->stream)); }
if (s->mode == 'w') { err = deflateEnd(&(s->stream)); } else if (s->mode == 'r') { err = inflateEnd(&(s->stream)); }
local int destroy (s)    gz_stream *s;{    int err = Z_OK;    if (!s) return Z_STREAM_ERROR;    TRYFREE(s->msg);    if (s->stream.state != NULL) {	if (s->mode == 'w') {#ifdef NO_DEFLATE	    err = Z_STREAM_ERROR;#else	    err = deflateEnd(&(s->stream));#endif	} else if (s->mode == 'r') {	    err = inflateEnd(&(s->stream));	}    }    if (s->file != NULL && fclose(s->file)) {#ifdef ESPIPE	if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */#endif	    err = Z_ERRNO;    }    if (s->z_err < 0) err = s->z_err;    TRYFREE(s->inbuf);    TRYFREE(s->outbuf);    TRYFREE(s->path);    TRYFREE(s);    return err;}