diff options
Diffstat (limited to 'lib/zlib')
-rw-r--r-- | lib/zlib/src/gzio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/zlib/src/gzio.c b/lib/zlib/src/gzio.c index 3c861fd..fed1ffa 100644 --- a/lib/zlib/src/gzio.c +++ b/lib/zlib/src/gzio.c @@ -5,7 +5,7 @@ * Compile this file with -DNO_DEFLATE to avoid the compression code. */ -/* @(#) $Id: gzio.c,v 1.2 2003-10-09 04:47:27 pixel Exp $ */ +/* @(#) $Id: gzio.c,v 1.3 2003-12-27 01:51:41 pixel Exp $ */ #include <stdio.h> @@ -605,7 +605,11 @@ local int do_flush (file, flush) int done = 0; gz_stream *s = (gz_stream*)file; - if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + if (s == NULL) + return Z_STREAM_ERROR; + else + if (s->mode != 'w') + return Z_STREAM_ERROR; s->stream.avail_in = 0; /* should be zero already anyway */ |