summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-07-14 18:42:21 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-07-14 18:42:21 +0000
commitfb843a811a8a9eb7c9d183929ee7da4e96efa6d4 (patch)
treec008b11a6eba7a8b685c3fbdad5420b6b689472d
parentdaefa53d92014023e73517e73a689c9a7836d0af (diff)
-t and implied -c due to piped in input is a legal combination of flags
-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 dfdfbb9f712..1b7693e19ef 100644
--- a/usr.bin/compress/main.c
+++ b/usr.bin/compress/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.33 2003/07/11 02:31:18 millert Exp $ */
+/* $OpenBSD: main.c,v 1.34 2003/07/14 18:42:20 mickey Exp $ */
static const char copyright[] =
"@(#) Copyright (c) 1992, 1993\n\
@@ -35,7 +35,7 @@ static const char license[] =
#if 0
static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94";
#else
-static const char main_rcsid[] = "$OpenBSD: main.c,v 1.33 2003/07/11 02:31:18 millert Exp $";
+static const char main_rcsid[] = "$OpenBSD: main.c,v 1.34 2003/07/14 18:42:20 mickey Exp $";
#endif
#endif /* not lint */
@@ -294,7 +294,7 @@ main(int argc, char *argv[])
if (oflag && (recurse || argc > 1))
errx(1, "-o option may only be used with a single input file");
- if (cat + testmode + oflag > 1)
+ if ((cat && argc) + testmode + oflag > 1)
errx(1, "may not mix -o, -c, or -t options");
if ((ftsp = fts_open(argv, FTS_PHYSICAL|FTS_NOCHDIR, 0)) == NULL)