summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-11-20 08:43:46 -0800
committerMark Adler <madler@alumni.caltech.edu>2011-11-27 14:15:40 -0800
commitde32a2d74948e13e4d8ec17263a31e2c3ae900b1 (patch)
tree1cdaed5a96b5c5cd62fc9f3ad51461dfb4f9eeaf
parent383d2cdab7662d21a3c720139635fe0fbc451a71 (diff)
downloadzlib-de32a2d74948e13e4d8ec17263a31e2c3ae900b1.tar.gz
zlib-de32a2d74948e13e4d8ec17263a31e2c3ae900b1.tar.bz2
zlib-de32a2d74948e13e4d8ec17263a31e2c3ae900b1.zip
Remove code from inflate.c and infback.c that is impossible to execute.
During coverage testing it was discovered that these two lines could never pull more bits, since the immediately preceding for loop assures that all of the code's bits are already pulled.
-rw-r--r--infback.c1
-rw-r--r--inflate.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/infback.c b/infback.c
index 5462952..c026485 100644
--- a/infback.c
+++ b/infback.c
@@ -403,7 +403,6 @@ void FAR *out_desc;
403 PULLBYTE(); 403 PULLBYTE();
404 } 404 }
405 if (here.val < 16) { 405 if (here.val < 16) {
406 NEEDBITS(here.bits);
407 DROPBITS(here.bits); 406 DROPBITS(here.bits);
408 state->lens[state->have++] = here.val; 407 state->lens[state->have++] = here.val;
409 } 408 }
diff --git a/inflate.c b/inflate.c
index 214bf26..6b0ebbf 100644
--- a/inflate.c
+++ b/inflate.c
@@ -944,7 +944,6 @@ int flush;
944 PULLBYTE(); 944 PULLBYTE();
945 } 945 }
946 if (here.val < 16) { 946 if (here.val < 16) {
947 NEEDBITS(here.bits);
948 DROPBITS(here.bits); 947 DROPBITS(here.bits);
949 state->lens[state->have++] = here.val; 948 state->lens[state->have++] = here.val;
950 } 949 }