]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove code from inflate.c and infback.c that is impossible to execute.
authorMark Adler <madler@alumni.caltech.edu>
Sun, 20 Nov 2011 16:43:46 +0000 (08:43 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Sun, 27 Nov 2011 22:15:40 +0000 (14:15 -0800)
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.

infback.c
inflate.c

index 5462952619931d5b1e6f7e94bbcaf3cd5684bfd4..c0264854399cab24847f80b045d8ec68a21262fb 100644 (file)
--- a/infback.c
+++ b/infback.c
@@ -403,7 +403,6 @@ void FAR *out_desc;
                     PULLBYTE();
                 }
                 if (here.val < 16) {
-                    NEEDBITS(here.bits);
                     DROPBITS(here.bits);
                     state->lens[state->have++] = here.val;
                 }
index 214bf26bc16d398ebecf3ffa094e8aff1ee18ba8..6b0ebbfbcd9434b447d970a989b7c599a553ca68 100644 (file)
--- a/inflate.c
+++ b/inflate.c
@@ -944,7 +944,6 @@ int flush;
                     PULLBYTE();
                 }
                 if (here.val < 16) {
-                    NEEDBITS(here.bits);
                     DROPBITS(here.bits);
                     state->lens[state->have++] = here.val;
                 }