maint: remove dead code
authorJim Meyering <meyering@fb.com>
Wed, 29 Jul 2015 05:31:30 +0000 (22:31 -0700)
committerJim Meyering <meyering@fb.com>
Thu, 30 Jul 2015 16:24:48 +0000 (09:24 -0700)
This package has not been compilable with -DCRYPT
since commit v1.4-82-g9d1b943.  Remove final vestiges.
* bits.c (copy_block) [CRYPT]: Remove #ifdef'd code.
* inflate.c (NEXTBYTE) [CRYPT]: Likewise.
Prompted by a report from Flávio Medeiros
that HEADER and T might be used uninitialized.

bits.c
inflate.c

diff --git a/bits.c b/bits.c
index 03ea3e998c5cda97cc0c5e7d019c77c7b22b97da..a6dc4dee4746733c862bcd171fab5ff2cf94cc1d 100644 (file)
--- a/bits.c
+++ b/bits.c
@@ -205,10 +205,6 @@ void copy_block(buf, len, header)
     bits_sent += (off_t)len<<3;
 #endif
     while (len--) {
-#ifdef CRYPT
-        int t;
-        if (key) zencode(*buf, t);
-#endif
         put_byte(*buf++);
     }
 }
index 14bdfc0ba3b679bf647b584c39b9d3d5ad2495ea..c81879f2b3304b2bd699088d2dc8c72661a3b137 100644 (file)
--- a/inflate.c
+++ b/inflate.c
@@ -219,13 +219,7 @@ static ush mask_bits[] = {
 
 #define GETBYTE() (inptr < insize ? inbuf[inptr++] : (wp = w, fill_inbuf(0)))
 
-#ifdef CRYPT
-  uch cc;
-#  define NEXTBYTE() \
-     (decrypt ? (cc = GETBYTE(), zdecode(cc), cc) : GETBYTE())
-#else
-#  define NEXTBYTE()  (uch)GETBYTE()
-#endif
+#define NEXTBYTE()  (uch)GETBYTE()
 #define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE())<<k;k+=8;}}
 #define DUMPBITS(n) {b>>=(n);k-=(n);}