diff options
author | 2003-07-27 19:04:22 +0000 | |
---|---|---|
committer | 2003-07-27 19:04:22 +0000 | |
commit | 61efc09d8e80ed68cd65987f2c7ffe94da928482 (patch) | |
tree | e8599b831dfe4ec6ff08cb2fbf7edaa84b36df27 | |
parent | We need to initialize clen to 0 each time through diffreg() for (diff) | |
download | wireguard-openbsd-61efc09d8e80ed68cd65987f2c7ffe94da928482.tar.xz wireguard-openbsd-61efc09d8e80ed68cd65987f2c7ffe94da928482.zip |
Return FAILURE for "file would grow" case so the .gz file gets removed.
Problem noticed by otto@
-rw-r--r-- | usr.bin/compress/main.c | 6 |
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) |