svn commit: r327172 - stable/10/usr.bin/gzip

Xin LI delphij at FreeBSD.org
Mon Dec 25 04:34:12 UTC 2017


Author: delphij
Date: Mon Dec 25 04:34:10 2017
New Revision: 327172
URL: https://svnweb.freebsd.org/changeset/base/327172

Log:
  MFC r326185: Set errno to EFTYPE instead of EINVAL to be more consistent
  with the rest of code.

Modified:
  stable/10/usr.bin/gzip/zuncompress.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/gzip/zuncompress.c
==============================================================================
--- stable/10/usr.bin/gzip/zuncompress.c	Mon Dec 25 04:32:15 2017	(r327171)
+++ stable/10/usr.bin/gzip/zuncompress.c	Mon Dec 25 04:34:10 2017	(r327172)
@@ -279,7 +279,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-all mailing list