MINOR: channel: rename bi_full to channel_full as it checks the whole channel
Since the function takes care of the forward count and involves more than
buffer knowledge, rename it.
diff --git a/src/channel.c b/src/channel.c
index 86fa811..0e1af13 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -128,7 +128,7 @@
buf->total += len;
buf->flags &= ~BF_FULL;
- if (bi_full(buf))
+ if (channel_full(buf))
buf->flags |= BF_FULL;
return -1;
@@ -152,7 +152,7 @@
*bi_end(&buf->buf) = c;
buf->buf.i++;
- if (bi_full(buf))
+ if (channel_full(buf))
buf->flags |= BF_FULL;
buf->flags |= BF_READ_PARTIAL;
@@ -215,7 +215,7 @@
}
buf->flags &= ~BF_FULL;
- if (bi_full(buf))
+ if (channel_full(buf))
buf->flags |= BF_FULL;
/* notify that some data was read from the SI into the buffer */
@@ -346,7 +346,7 @@
b->flags &= ~BF_FULL;
if (buffer_len(&b->buf) == 0)
b->buf.p = b->buf.data;
- if (bi_full(b))
+ if (channel_full(b))
b->flags |= BF_FULL;
return delta;
@@ -384,7 +384,7 @@
b->buf.i += delta;
b->flags &= ~BF_FULL;
- if (bi_full(b))
+ if (channel_full(b))
b->flags |= BF_FULL;
return delta;
diff --git a/src/stream_interface.c b/src/stream_interface.c
index 14e2cd5..2f3400d 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -727,7 +727,7 @@
b->flags |= BF_WRITE_PARTIAL;
- if (likely(!bi_full(b)))
+ if (likely(!channel_full(b)))
b->flags &= ~BF_FULL;
if (!b->buf.o) {
@@ -1080,7 +1080,7 @@
b->flags |= BF_READ_PARTIAL;
b->total += ret;
- if (bi_full(b)) {
+ if (channel_full(b)) {
/* The buffer is now full, there's no point in going through
* the loop again.
*/