From 3ac71d9e2f860ac3634b43a99892255eb39179cf Mon Sep 17 00:00:00 2001 From: Hans Kristian Rosbach Date: Wed, 7 Feb 2024 21:25:53 +0100 Subject: [PATCH] Avoid empty function by renaming bi_flush to zng_tr_flush_bits. --- trees.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/trees.c b/trees.c index 4189cc73..9f2f4913 100644 --- 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));