MINOR: buffer: use b_room() to determine available space in a buffer
We used to have variations around buffer_total_space() and
size-buffer_len() or size-b_data(). Let's simplify all this. buffer_len()
was also removed as not used anymore.
diff --git a/src/checks.c b/src/checks.c
index a499f23..4c777b7 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -2670,7 +2670,7 @@
if (check->bo->o &&
(&check->current_step->list == head ||
check->current_step->action != TCPCHK_ACT_SEND ||
- check->current_step->string_len >= buffer_total_space(check->bo))) {
+ check->current_step->string_len >= b_room(check->bo))) {
int ret;
__cs_want_send(cs);
@@ -2869,7 +2869,7 @@
}
/* do not try to send if there is no space */
- if (check->current_step->string_len >= buffer_total_space(check->bo))
+ if (check->current_step->string_len >= b_room(check->bo))
continue;
bo_putblk(check->bo, check->current_step->string, check->current_step->string_len);