diff --git a/include/common/buffer.h b/include/common/buffer.h index b29946673..ada43d92f 100644 --- a/include/common/buffer.h +++ b/include/common/buffer.h @@ -96,12 +96,21 @@ static inline unsigned int b_to_end(const struct buffer *b) * The caller is responsible for ensuring that is always smaller than or * equal to b->i. */ -static inline void b_del(struct buffer *b, unsigned int del) +static inline void bi_del(struct buffer *b, unsigned int del) { b->i -= del; b->p = b_ptr(b, del); } +/* Skips bytes from the output of buffer by simply shrinking . + * The caller is responsible for ensuring that is always smaller than or + * equal to b->o. + */ +static inline void bo_del(struct buffer *b, unsigned int del) +{ + b->o -= del; +} + /* Advances the buffer by bytes, which means that the buffer * pointer advances, and that as many bytes from in are transferred * to out. The caller is responsible for ensuring that adv is always