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.
From 0f0c6c12169dd2bcb05909e20e10f94a1c54d69f Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyer...@fb.com>
Date: Tue, 28 Jul 2015 22:31:30 -0700
Subject: [PATCH] maint: remove dead code
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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    | 4 ----
 inflate.c | 8 +-------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/bits.c b/bits.c
index 03ea3e9..a6dc4de 100644
--- 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++);
     }
 }
diff --git a/inflate.c b/inflate.c
index 14bdfc0..c81879f 100644
--- 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);}

-- 
2.3.7

Reply via email to