diff --git a/include/common/buf.h b/include/common/buf.h index 420882026..d39de7112 100644 --- a/include/common/buf.h +++ b/include/common/buf.h @@ -578,7 +578,7 @@ static inline int b_rep_blk(struct buffer *b, char *pos, char *end, const char * delta = len - (end - pos); - if (b_tail(b) + delta > b_wrap(b)) + if (__b_tail(b) + delta > b_wrap(b)) return 0; /* no space left */ if (b_data(b) && diff --git a/src/channel.c b/src/channel.c index 13184ec3a..3bf5c5042 100644 --- a/src/channel.c +++ b/src/channel.c @@ -417,7 +417,7 @@ int ci_insert_line2(struct channel *c, int pos, const char *str, int len) delta = len + 2; - if (b_tail(b) + delta >= b_wrap(b)) + if (__b_tail(b) + delta >= b_wrap(b)) return 0; /* no space left */ if (b_data(b) &&