mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
MINOR: ring: add ring_size() to return the ring's size
This is just to ease conversion so that callers stop accessing the ring's buffer.
This commit is contained in:
parent
4c41fcd0da
commit
a185d3d90d
1 changed files with 6 additions and 0 deletions
|
|
@ -51,6 +51,12 @@ static inline size_t ring_data(const struct ring *ring)
|
|||
return b_data(&ring->buf);
|
||||
}
|
||||
|
||||
/* returns the allocated size in bytes for the ring */
|
||||
static inline size_t ring_size(const struct ring *ring)
|
||||
{
|
||||
return b_size(&ring->buf);
|
||||
}
|
||||
|
||||
#endif /* _HAPROXY_RING_H */
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue