summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-07-27 19:04:23 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-07-27 19:04:23 +0000
commit9c1d7cd80763582d937af51406050c5cc94fb487 (patch)
tree411691644f2f286a9e38e47561965c95b679fe57 /usr.bin
parentcfdc44f9c19b9247c0619b1dcd698d8ec4992415 (diff)
Return FAILURE for "file would grow" case so the .gz file gets removed.
Problem noticed by otto@
Diffstat (limited to 'usr.bin')
-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 f2008412fcc..c8abef3fa6d 100644
--- a/usr.bin/compress/main.c
+++ b/usr.bin/compress/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.40 2003/07/25 20:10:53 millert Exp $ */
+/* $OpenBSD: main.c,v 1.41 2003/07/27 19:04:22 millert 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.40 2003/07/25 20:10:53 millert Exp $";
+static const char main_rcsid[] = "$OpenBSD: main.c,v 1.41 2003/07/27 19:04:22 millert Exp $";
#endif
#endif /* not lint */
@@ -506,7 +506,7 @@ compress(const char *in, char *out, const struct compressor *method,
if (!force && info.total_out >= info.total_in) {
if (verbose > 0)
fprintf(stderr, "file would grow; left unmodified\n");
- error = WARNING;
+ error = FAILURE;
}
if (!error && verbose > 0)