summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormoritz <moritz@openbsd.org>2005-02-24 09:44:36 +0000
committermoritz <moritz@openbsd.org>2005-02-24 09:44:36 +0000
commit2348b71305106f7b0b788a6a5528c77bf1c6d032 (patch)
tree97b02367a14a1fa4770de2690dbe7b1611100c51
parentAdd tedu's copy* test, turned into a regress test by me. (diff)
downloadwireguard-openbsd-2348b71305106f7b0b788a6a5528c77bf1c6d032.tar.xz
wireguard-openbsd-2348b71305106f7b0b788a6a5528c77bf1c6d032.zip
remove docompress() completely in case of -DSMALL and
replace it with a better error message. ok millert@ henning@
-rw-r--r--usr.bin/compress/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/compress/main.c b/usr.bin/compress/main.c
index 4fd0f7a78c7..b26c984561f 100644
--- a/usr.bin/compress/main.c
+++ b/usr.bin/compress/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.58 2005/02/07 08:37:28 otto Exp $ */
+/* $OpenBSD: main.c,v 1.59 2005/02/24 09:44:36 moritz 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.58 2005/02/07 08:37:28 otto Exp $";
+static const char main_rcsid[] = "$OpenBSD: main.c,v 1.59 2005/02/24 09:44:36 moritz Exp $";
#endif
#include <sys/param.h>
@@ -454,6 +454,7 @@ int
docompress(const char *in, char *out, const struct compressor *method,
int bits, struct stat *sb)
{
+#ifndef SMALL
u_char buf[Z_BUFSIZE];
char *name;
int error, ifd, ofd, flags;
@@ -538,6 +539,10 @@ docompress(const char *in, char *out, const struct compressor *method,
verbose_info(out, info.total_out, info.total_in, info.hlen);
return (error);
+#else
+ warnx("compression not supported");
+ return (FAILURE);
+#endif
}
const struct compressor *