summaryrefslogtreecommitdiffstats
path: root/lib/libz/gzio.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2005-04-24 22:04:34 +0000
committerkientzle <kientzle@FreeBSD.org>2005-04-24 22:04:34 +0000
commit3747e27470bbbe7814c461cc08721134042edf4f (patch)
treed0f81de838e0836bac9d9a07be0689517ab88392 /lib/libz/gzio.c
parent565fffc820190dd544674c64be3f824344f4e766 (diff)
downloadFreeBSD-src-3747e27470bbbe7814c461cc08721134042edf4f.zip
FreeBSD-src-3747e27470bbbe7814c461cc08721134042edf4f.tar.gz
Update zconf.h and gzio.c with changes from ZLib 1.2.1 to ZLib 1.2.2.
These are two of the three files that have non-trivial differences from the vendor branch. minigzip.c is the third, but there were no changes from ZLib 1.2.1 to ZLib 1.2.2 in that file. The rest of the files I intend to get reverted back to the vendor branch (with cooperation of cvsadmin@). PR: i386/76294
Diffstat (limited to 'lib/libz/gzio.c')
-rw-r--r--lib/libz/gzio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libz/gzio.c b/lib/libz/gzio.c
index 88e3f03..5424de0 100644
--- a/lib/libz/gzio.c
+++ b/lib/libz/gzio.c
@@ -456,6 +456,10 @@ int ZEXPORT gzread (file, buf, len)
s->z_err = Z_ERRNO;
break;
}
+ if (feof(s->file)) { /* avoid error for empty file */
+ s->z_err = Z_STREAM_END;
+ break;
+ }
}
s->stream.next_in = s->inbuf;
}
OpenPOWER on IntegriCloud