aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/compress
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-10-21 11:48:39 +0000
committerBruce Evans <bde@FreeBSD.org>1998-10-21 11:48:39 +0000
commitd52ae8190d4ea364a640e95b166c1e4dec36763e (patch)
tree4431a53893eaa1cb60ae34321ed88a4eb2167bdb /usr.bin/compress
parent12d534d2f9303eb963293d3537049f3fdcd6101b (diff)
Notes
Diffstat (limited to 'usr.bin/compress')
-rw-r--r--usr.bin/compress/compress.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c
index 2736e5c554081..5e323d3bde13f 100644
--- a/usr.bin/compress/compress.c
+++ b/usr.bin/compress/compress.c
@@ -75,11 +75,12 @@ main(argc, argv)
int argc;
char *argv[];
{
- enum {COMPRESS, DECOMPRESS} style = COMPRESS;
+ enum {COMPRESS, DECOMPRESS} style;
size_t len;
int bits, cat, ch;
char *p, newname[MAXPATHLEN];
+ cat = 0;
if ((p = rindex(argv[0], '/')) == NULL)
p = argv[0];
else
@@ -89,12 +90,12 @@ main(argc, argv)
else if (!strcmp(p, "compress"))
style = COMPRESS;
else if (!strcmp(p, "zcat")) {
- style = DECOMPRESS;
cat = 1;
+ style = DECOMPRESS;
} else
errx(1, "unknown program name");
- bits = cat = 0;
+ bits = 0;
while ((ch = getopt(argc, argv, "b:cdfv")) != -1)
switch(ch) {
case 'b':