From e37570e139748d180457d85ff858c869242781b3 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 18 Jan 2007 20:53:37 +0000 Subject: We don't want to use GZIP for compress. Only examine GZIP environment variable when invoked as gzip, gunzip, gzcat, etc. OK otto@ --- usr.bin/compress/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/compress/main.c b/usr.bin/compress/main.c index 98f1a9939eb..82e11fb30c7 100644 --- a/usr.bin/compress/main.c +++ b/usr.bin/compress/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.67 2006/12/01 08:14:53 otto Exp $ */ +/* $OpenBSD: main.c,v 1.68 2007/01/18 20:53:36 millert Exp $ */ #ifndef SMALL static const char copyright[] = @@ -36,7 +36,7 @@ static const char license[] = #endif /* SMALL */ #ifndef SMALL -static const char main_rcsid[] = "$OpenBSD: main.c,v 1.67 2006/12/01 08:14:53 otto Exp $"; +static const char main_rcsid[] = "$OpenBSD: main.c,v 1.68 2007/01/18 20:53:36 millert Exp $"; #endif #include @@ -176,7 +176,7 @@ main(int argc, char *argv[]) strlcpy(suffix, method->suffix, sizeof(suffix)); nargv[0] = NULL; - if ((p = getenv("GZIP")) != NULL) { + if (method == M_DEFLATE && (p = getenv("GZIP")) != NULL) { char *last; nargv[0] = *argv++; -- cgit v1.2.3