diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:24:24 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:24:24 -0700 |
commit | 9811b53dd9e8f67015c7199fff12b5bfc6965330 (patch) | |
tree | bfa72ee22967fb56833203dfcd31c473c86b1bf1 /gzio.c | |
parent | 79fbcdc939b5d515218187a0d5f2526fb632075a (diff) | |
download | zlib-9811b53dd9e8f67015c7199fff12b5bfc6965330.tar.gz zlib-9811b53dd9e8f67015c7199fff12b5bfc6965330.tar.bz2 zlib-9811b53dd9e8f67015c7199fff12b5bfc6965330.zip |
zlib 1.2.2.1v1.2.2.1
Diffstat (limited to 'gzio.c')
-rw-r--r-- | gzio.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* gzio.c -- IO on .gz files | 1 | /* gzio.c -- IO on .gz files |
2 | * Copyright (C) 1995-2003 Jean-loup Gailly. | 2 | * Copyright (C) 1995-2004 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | * | 4 | * |
5 | * Compile this file with -DNO_GZCOMPRESS to avoid the compression code. | 5 | * Compile this file with -DNO_GZCOMPRESS to avoid the compression code. |
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include "zutil.h" | 12 | #include "zutil.h" |
13 | 13 | ||
14 | #ifdef NO_DEFLATE /* for compatiblity with old definition */ | 14 | #ifdef NO_DEFLATE /* for compatibility with old definition */ |
15 | # define NO_GZCOMPRESS | 15 | # define NO_GZCOMPRESS |
16 | #endif | 16 | #endif |
17 | 17 | ||
@@ -941,7 +941,6 @@ local uLong getLong (s) | |||
941 | int ZEXPORT gzclose (file) | 941 | int ZEXPORT gzclose (file) |
942 | gzFile file; | 942 | gzFile file; |
943 | { | 943 | { |
944 | int err; | ||
945 | gz_stream *s = (gz_stream*)file; | 944 | gz_stream *s = (gz_stream*)file; |
946 | 945 | ||
947 | if (s == NULL) return Z_STREAM_ERROR; | 946 | if (s == NULL) return Z_STREAM_ERROR; |
@@ -950,8 +949,8 @@ int ZEXPORT gzclose (file) | |||
950 | #ifdef NO_GZCOMPRESS | 949 | #ifdef NO_GZCOMPRESS |
951 | return Z_STREAM_ERROR; | 950 | return Z_STREAM_ERROR; |
952 | #else | 951 | #else |
953 | err = do_flush (file, Z_FINISH); | 952 | if (do_flush (file, Z_FINISH) != Z_OK) |
954 | if (err != Z_OK) return destroy((gz_stream*)file); | 953 | return destroy((gz_stream*)file); |
955 | 954 | ||
956 | putLong (s->file, s->crc); | 955 | putLong (s->file, s->crc); |
957 | putLong (s->file, (uLong)(s->in & 0xffffffff)); | 956 | putLong (s->file, (uLong)(s->in & 0xffffffff)); |