mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-01 22:48:25 +00:00
MINOR: buffer: use c_head() instead of buffer_wrap_sub(c->buf, p-o)
This way we don't need o anymore.
This commit is contained in:
parent
144c5c4d21
commit
50227f9b88
@ -61,14 +61,6 @@ void buffer_dump(FILE *o, struct buffer *b, int from, int to);
|
||||
|
||||
/***** FIXME: OLD API BELOW *****/
|
||||
|
||||
/* Normalizes a pointer after a subtract */
|
||||
static inline char *buffer_wrap_sub(const struct buffer *buf, char *ptr)
|
||||
{
|
||||
if (ptr < buf->data)
|
||||
ptr += buf->size;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
/* Normalizes a pointer after an addition */
|
||||
static inline char *buffer_wrap_add(const struct buffer *buf, char *ptr)
|
||||
{
|
||||
|
@ -823,7 +823,7 @@ static inline int co_getchr(struct channel *chn)
|
||||
return -2;
|
||||
return -1;
|
||||
}
|
||||
return *buffer_wrap_sub(chn->buf, chn->buf->p - chn->buf->o);
|
||||
return *co_head(chn);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user