diff options
author | Richard Braun <rbraun@sceen.net> | 2018-02-24 05:04:07 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-02-24 05:42:07 +0100 |
commit | 8dbe6957da40b713a214d765a83cbe81d24e753e (patch) | |
tree | f8d5b0321782e893e1070a27c83c4f1dbf39e53f /lib/cbuf.h | |
parent | 97f83b42af28a9ecbfd714a8337fd399a32cfb78 (diff) |
lib: update from upstream
Diffstat (limited to 'lib/cbuf.h')
-rw-r--r-- | lib/cbuf.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -70,6 +70,12 @@ cbuf_size(const struct cbuf *cbuf) return cbuf->end - cbuf->start; } +static inline size_t +cbuf_avail_size(const struct cbuf *cbuf) +{ + return cbuf_capacity(cbuf) - cbuf_size(cbuf); +} + static inline void cbuf_clear(struct cbuf *cbuf) { |