b_del() is used in :
- mux_h2 with the demux buffer : always processes input data
- checks with output data though output is not considered at all there
- b_eat() which is not used anywhere
- co_skip() where the len is always <= output
Thus the distinction for output data is not needed anymore and the
decrement can be made inconditionally in co_skip().
*/
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)
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 */