summaryrefslogtreecommitdiff
path: root/lib/zlib
diff options
context:
space:
mode:
authorpixel <pixel>2003-12-27 01:51:41 +0000
committerpixel <pixel>2003-12-27 01:51:41 +0000
commit63cc0687e978f9d93ff2dd569e19c9f6a713a8bd (patch)
tree2d9b3f9c6843477a1793189ff990557b2b2ef558 /lib/zlib
parent90feaf386aad4209cba46eea0a5f1bf849af833d (diff)
Removing flusing of non writable streams
Diffstat (limited to 'lib/zlib')
-rw-r--r--lib/zlib/src/gzio.c8
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 */