diff --git a/include/common/buf.h b/include/common/buf.h index 02a66b366..6eec42292 100644 --- a/include/common/buf.h +++ b/include/common/buf.h @@ -396,10 +396,6 @@ static inline void b_set_data(struct buffer *b, size_t len) */ static inline void b_del(struct buffer *b, size_t del) { - if (del >= b->output) - b->output = 0; - else - b->output -= del; b->len -= del; b->head += del; if (b->head >= b->size) diff --git a/include/proto/channel.h b/include/proto/channel.h index 291bb08f8..624123799 100644 --- a/include/proto/channel.h +++ b/include/proto/channel.h @@ -767,6 +767,7 @@ static inline void channel_slow_realign(struct channel *chn, char *swap) static inline void co_skip(struct channel *chn, int len) { b_del(chn->buf, len); + chn->buf->output -= len; c_realign_if_empty(chn); /* notify that some data was written to the SI from the buffer */