From 7ef84b00caa23770662840ad2ca7f28de12e3f5d Mon Sep 17 00:00:00 2001 From: delphij Date: Sat, 25 Nov 2017 09:03:38 +0000 Subject: [PATCH] Set errno to EFTYPE instead of EINVAL to be more consistent with the rest of code. MFC after: 1 month --- usr.bin/gzip/zuncompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/gzip/zuncompress.c b/usr.bin/gzip/zuncompress.c index c1ea1c79925a..b2f3e8d51bd3 100644 --- a/usr.bin/gzip/zuncompress.c +++ b/usr.bin/gzip/zuncompress.c @@ -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;