mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-22 23:02:34 -04:00
MINOR: istbuf: add ist2buf() function
Purpose of this function is to build a <struct buffer> from a <struct ist>.
This commit is contained in:
parent
de80201460
commit
0e9d87bf06
1 changed files with 13 additions and 0 deletions
|
|
@ -139,6 +139,19 @@ static inline size_t b_putist(struct buffer *b, const struct ist ist)
|
|||
return b_putblk(b, ist.ptr, ist.len);
|
||||
}
|
||||
|
||||
/* builds and return a <struct buffer> based on <ist>
|
||||
*/
|
||||
static inline struct buffer ist2buf(const struct ist ist)
|
||||
{
|
||||
struct buffer buf;
|
||||
|
||||
buf.area = ist.ptr;
|
||||
buf.size = ist.len;
|
||||
buf.data = ist.len;
|
||||
buf.head = 0;
|
||||
return buf;
|
||||
}
|
||||
|
||||
#endif /* _COMMON_ISTBUF_H */
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue