1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

gzip_read: always call gzclearerr

This is necessary when using a POSIX-compliant stdio implementation, which
will set the FILE error flag when input from the pipe is exhausted, causing
all subsequent reads to fail.
This commit is contained in:
Rich Felker 2006-11-05 04:53:42 +00:00 committed by Miciah Dashiel Butler Masters
parent dfbbde1952
commit d2b8e06f41

View File

@ -33,6 +33,7 @@ gzip_open(struct stream_encoded *stream, int fd)
static int
gzip_read(struct stream_encoded *stream, unsigned char *data, int len)
{
gzclearerr((gzFile *) stream->data);
return gzread((gzFile *) stream->data, data, len);
}