svn commit: r326185 - head/usr.bin/gzip
Xin LI
delphij at FreeBSD.org
Sat Nov 25 09:03:39 UTC 2017
Author: delphij
Date: Sat Nov 25 09:03:38 2017
New Revision: 326185
URL: https://svnweb.freebsd.org/changeset/base/326185
Log:
Set errno to EFTYPE instead of EINVAL to be more consistent with the
rest of code.
MFC after: 1 month
Modified:
head/usr.bin/gzip/zuncompress.c
Modified: head/usr.bin/gzip/zuncompress.c
==============================================================================
--- head/usr.bin/gzip/zuncompress.c Sat Nov 25 04:49:12 2017 (r326184)
+++ head/usr.bin/gzip/zuncompress.c Sat Nov 25 09:03:38 2017 (r326185)
@@ -281,7 +281,7 @@ zread(void *cookie, char *rbp, int num)
if (zs->u.r.zs_code > zs->zs_free_ent ||
zs->u.r.zs_oldcode == -1) {
/* Bad stream. */
- errno = EINVAL;
+ errno = EFTYPE;
return (-1);
}
*zs->u.r.zs_stackp++ = zs->u.r.zs_finchar;
More information about the svn-src-head
mailing list