aboutsummaryrefslogtreecommitdiff
path: root/gzio.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzio.c')
-rw-r--r--gzio.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gzio.c b/gzio.c
index 5e71b0a..ce55f2d 100644
--- a/gzio.c
+++ b/gzio.c
@@ -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)
941int ZEXPORT gzclose (file) 941int 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));