aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-03-26 09:47:37 +0100
committerRon Yorston <rmy@pobox.com>2012-03-26 09:47:37 +0100
commit1da4cf7e236ae2855bab1d0980a0e3f42194ccad (patch)
treee30afa56b85835db8fbd82dc1cdf007434d25711
parent627e50a77609a4d4b5738c64d401fc53331eee46 (diff)
downloadbusybox-w32-1da4cf7e236ae2855bab1d0980a0e3f42194ccad.tar.gz
busybox-w32-1da4cf7e236ae2855bab1d0980a0e3f42194ccad.tar.bz2
busybox-w32-1da4cf7e236ae2855bab1d0980a0e3f42194ccad.zip
Remove unnecessary rename of variable eof
-rw-r--r--archival/gzip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index 025e0a9f6..80db4f969 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -1594,7 +1594,7 @@ static void compress_block(ct_data * ltree, ct_data * dtree)
1594 * trees or store, and output the encoded block to the zip file. This function 1594 * trees or store, and output the encoded block to the zip file. This function
1595 * returns the total compressed length for the file so far. 1595 * returns the total compressed length for the file so far.
1596 */ 1596 */
1597static ulg flush_block(char *buf, ulg stored_len, int eof_) 1597static ulg flush_block(char *buf, ulg stored_len, int eof)
1598{ 1598{
1599 ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ 1599 ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
1600 int max_blindex; /* index of last bit length code of non zero freq */ 1600 int max_blindex; /* index of last bit length code of non zero freq */
@@ -1632,7 +1632,7 @@ static ulg flush_block(char *buf, ulg stored_len, int eof_)
1632 * and if the zip file can be seeked (to rewrite the local header), 1632 * and if the zip file can be seeked (to rewrite the local header),
1633 * the whole file is transformed into a stored file: 1633 * the whole file is transformed into a stored file:
1634 */ 1634 */
1635 if (stored_len <= opt_lenb && eof_ && G2.compressed_len == 0L && seekable()) { 1635 if (stored_len <= opt_lenb && eof && G2.compressed_len == 0L && seekable()) {
1636 /* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */ 1636 /* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */
1637 if (buf == NULL) 1637 if (buf == NULL)
1638 bb_error_msg("block vanished"); 1638 bb_error_msg("block vanished");
@@ -1648,18 +1648,18 @@ static ulg flush_block(char *buf, ulg stored_len, int eof_)
1648 * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to 1648 * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
1649 * transform a block into a stored block. 1649 * transform a block into a stored block.
1650 */ 1650 */
1651 send_bits((STORED_BLOCK << 1) + eof_, 3); /* send block type */ 1651 send_bits((STORED_BLOCK << 1) + eof, 3); /* send block type */
1652 G2.compressed_len = (G2.compressed_len + 3 + 7) & ~7L; 1652 G2.compressed_len = (G2.compressed_len + 3 + 7) & ~7L;
1653 G2.compressed_len += (stored_len + 4) << 3; 1653 G2.compressed_len += (stored_len + 4) << 3;
1654 1654
1655 copy_block(buf, (unsigned) stored_len, 1); /* with header */ 1655 copy_block(buf, (unsigned) stored_len, 1); /* with header */
1656 1656
1657 } else if (static_lenb == opt_lenb) { 1657 } else if (static_lenb == opt_lenb) {
1658 send_bits((STATIC_TREES << 1) + eof_, 3); 1658 send_bits((STATIC_TREES << 1) + eof, 3);
1659 compress_block((ct_data *) G2.static_ltree, (ct_data *) G2.static_dtree); 1659 compress_block((ct_data *) G2.static_ltree, (ct_data *) G2.static_dtree);
1660 G2.compressed_len += 3 + G2.static_len; 1660 G2.compressed_len += 3 + G2.static_len;
1661 } else { 1661 } else {
1662 send_bits((DYN_TREES << 1) + eof_, 3); 1662 send_bits((DYN_TREES << 1) + eof, 3);
1663 send_all_trees(G2.l_desc.max_code + 1, G2.d_desc.max_code + 1, 1663 send_all_trees(G2.l_desc.max_code + 1, G2.d_desc.max_code + 1,
1664 max_blindex + 1); 1664 max_blindex + 1);
1665 compress_block((ct_data *) G2.dyn_ltree, (ct_data *) G2.dyn_dtree); 1665 compress_block((ct_data *) G2.dyn_ltree, (ct_data *) G2.dyn_dtree);
@@ -1668,12 +1668,12 @@ static ulg flush_block(char *buf, ulg stored_len, int eof_)
1668 Assert(G2.compressed_len == G1.bits_sent, "bad compressed size"); 1668 Assert(G2.compressed_len == G1.bits_sent, "bad compressed size");
1669 init_block(); 1669 init_block();
1670 1670
1671 if (eof_) { 1671 if (eof) {
1672 bi_windup(); 1672 bi_windup();
1673 G2.compressed_len += 7; /* align on byte boundary */ 1673 G2.compressed_len += 7; /* align on byte boundary */
1674 } 1674 }
1675 Tracev((stderr, "\ncomprlen %lu(%lu) ", G2.compressed_len >> 3, 1675 Tracev((stderr, "\ncomprlen %lu(%lu) ", G2.compressed_len >> 3,
1676 G2.compressed_len - 7 * eof_)); 1676 G2.compressed_len - 7 * eof));
1677 1677
1678 return G2.compressed_len >> 3; 1678 return G2.compressed_len >> 3;
1679} 1679}