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;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to