Remove bufs_avail
This commit is contained in:
parent
e36caef006
commit
40d217beb1
|
@ -296,12 +296,6 @@ size_t nghttp2_bufs_len(nghttp2_bufs *bufs) {
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t bufs_avail(nghttp2_bufs *bufs) {
|
|
||||||
return nghttp2_buf_avail(&bufs->cur->buf) +
|
|
||||||
(bufs->chunk_length - bufs->offset) *
|
|
||||||
(bufs->max_chunk - bufs->chunk_used);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int bufs_alloc_chain(nghttp2_bufs *bufs) {
|
static int bufs_alloc_chain(nghttp2_bufs *bufs) {
|
||||||
int rv;
|
int rv;
|
||||||
nghttp2_buf_chain *chain;
|
nghttp2_buf_chain *chain;
|
||||||
|
@ -341,10 +335,6 @@ int nghttp2_bufs_add(nghttp2_bufs *bufs, const void *data, size_t len) {
|
||||||
nghttp2_buf *buf;
|
nghttp2_buf *buf;
|
||||||
const uint8_t *p;
|
const uint8_t *p;
|
||||||
|
|
||||||
if (bufs_avail(bufs) < len) {
|
|
||||||
return NGHTTP2_ERR_BUFFER_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
p = data;
|
p = data;
|
||||||
|
|
||||||
while (len) {
|
while (len) {
|
||||||
|
|
Loading…
Reference in New Issue