]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Avoid empty function by renaming bi_flush to zng_tr_flush_bits.
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 7 Feb 2024 20:25:53 +0000 (21:25 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 12 Feb 2024 13:37:19 +0000 (14:37 +0100)
trees.c

diff --git a/trees.c b/trees.c
index 4189cc738eb7071e3b064bf4b2e5f7b8d298d3a3..9f2f49137f08a41be5f46fc70e41598cb6dedcab 100644 (file)
--- a/trees.c
+++ b/trees.c
@@ -75,7 +75,6 @@ static int  build_bl_tree    (deflate_state *s);
 static void send_all_trees   (deflate_state *s, int lcodes, int dcodes, int blcodes);
 static void compress_block   (deflate_state *s, const ct_data *ltree, const ct_data *dtree);
 static int  detect_data_type (deflate_state *s);
-static void bi_flush         (deflate_state *s);
 
 /* ===========================================================================
  * Initialize the tree data structures for a new zlib stream.
@@ -609,13 +608,6 @@ void Z_INTERNAL zng_tr_stored_block(deflate_state *s, char *buf, uint32_t stored
     }
 }
 
-/* ===========================================================================
- * Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
- */
-void Z_INTERNAL zng_tr_flush_bits(deflate_state *s) {
-    bi_flush(s);
-}
-
 /* ===========================================================================
  * Send one empty static block to give enough lookahead for inflate.
  * This takes 10 bits, of which 7 may remain in the bit buffer.
@@ -623,7 +615,7 @@ void Z_INTERNAL zng_tr_flush_bits(deflate_state *s) {
 void Z_INTERNAL zng_tr_align(deflate_state *s) {
     zng_tr_emit_tree(s, STATIC_TREES, 0);
     zng_tr_emit_end_block(s, static_ltree, 0);
-    bi_flush(s);
+    zng_tr_flush_bits(s);
 }
 
 /* ===========================================================================
@@ -790,7 +782,7 @@ static int detect_data_type(deflate_state *s) {
 /* ===========================================================================
  * Flush the bit buffer, keeping at most 7 bits in it.
  */
-static void bi_flush(deflate_state *s) {
+void Z_INTERNAL zng_tr_flush_bits(deflate_state *s) {
     if (s->bi_valid >= 48) {
         put_uint32(s, (uint32_t)s->bi_buf);
         put_short(s, (uint16_t)(s->bi_buf >> 32));