From 81f6ec36f467795d7f17fcc669395f8a5d1223bb Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 3 Jan 2010 03:09:01 +0100 Subject: [PATCH] [btr:] Rename btr_merge(). --- buffer_tree.c | 6 +++--- buffer_tree.h | 3 +-- filter_common.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/buffer_tree.c b/buffer_tree.c index 7e0ec278..cd3a3c78 100644 --- a/buffer_tree.c +++ b/buffer_tree.c @@ -311,7 +311,7 @@ void *btr_context(struct btr_node *btrn) * * \return The number of buffers that have been available (zero, one or two). */ -int btr_merge(struct btr_node *btrn) +static int merge_input(struct btr_node *btrn) { struct btr_buffer_reference *brs[2], *br; char *bufs[2], *buf; @@ -352,14 +352,14 @@ int btr_merge(struct btr_node *btrn) return 2; } -void btr_merge_to(struct btr_node *btrn, size_t dest_size) +void btr_merge(struct btr_node *btrn, size_t dest_size) { for (;;) { char *buf; size_t len = btr_next_buffer(btrn, &buf); if (len >= dest_size) return; - if (btr_merge(btrn) < 2) + if (merge_input(btrn) < 2) return; } } diff --git a/buffer_tree.h b/buffer_tree.h index 094bfeac..589bde27 100644 --- a/buffer_tree.h +++ b/buffer_tree.h @@ -19,6 +19,5 @@ int btr_exec_up(struct btr_node *btrn, const char *command, char **value_result) void btr_splice_out_node(struct btr_node *btrn); void btr_pushdown(struct btr_node *btrn); void *btr_context(struct btr_node *btrn); -int btr_merge(struct btr_node *btrn); -void btr_merge_to(struct btr_node *btrn, size_t dest_size); +void btr_merge(struct btr_node *btrn, size_t dest_size); bool btr_eof(struct btr_node *btrn); diff --git a/filter_common.c b/filter_common.c index bc5539d0..7ffc50a7 100644 --- a/filter_common.c +++ b/filter_common.c @@ -292,6 +292,6 @@ int prepare_filter_node(struct btr_node *btrn, size_t min_len) return 0; assert(iqs != 0); /* avoid "buffer too small" errors from the decoder */ - btr_merge_to(btrn, min_len); + btr_merge(btrn, min_len); return 1; } -- 2.39.5