summaryrefslogtreecommitdiff
path: root/usr.bin/compress
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2007-01-18 20:53:37 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2007-01-18 20:53:37 +0000
commite37570e139748d180457d85ff858c869242781b3 (patch)
treed04141c2059d7b1936186d0bdd67805ae70413ed /usr.bin/compress
parent8e57b88ee1de7d3309d986e99349c19dabace7ab (diff)
We don't want to use GZIP for compress. Only examine GZIP environment
variable when invoked as gzip, gunzip, gzcat, etc. OK otto@
Diffstat (limited to 'usr.bin/compress')
-rw-r--r--usr.bin/compress/main.c6
1 files changed, 3 insertions, 3 deletions
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 <sys/param.h>
@@ -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++;