diff options
author | Michael Brown | 2007-01-18 16:13:41 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-18 16:13:41 +0100 |
commit | c8b3e969a0b5da1697efe74d835b53085daabed4 (patch) | |
tree | 15b5e1c112c0682c8ab7aa00b136b6d388b8d89a /src/core/buffer.c | |
parent | Presize the download buffer when we see the Content-Length header; (diff) | |
download | ipxe-c8b3e969a0b5da1697efe74d835b53085daabed4.tar.gz ipxe-c8b3e969a0b5da1697efe74d835b53085daabed4.tar.xz ipxe-c8b3e969a0b5da1697efe74d835b53085daabed4.zip |
Allow buffers to be pre-expanded on demand.
Diffstat (limited to 'src/core/buffer.c')
-rw-r--r-- | src/core/buffer.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/buffer.c b/src/core/buffer.c index c382b5fe..ff1c6fca 100644 --- a/src/core/buffer.c +++ b/src/core/buffer.c @@ -167,11 +167,7 @@ int fill_buffer ( struct buffer *buffer, const void *data, /* Check that block fits within buffer, expand if necessary */ if ( data_end > buffer->len ) { - if ( ! buffer->expand ) { - DBGC ( buffer, "BUFFER %p not expandable\n", buffer ); - return -ENOBUFS; - } - if ( ( rc = buffer->expand ( buffer, data_end ) ) != 0 ) { + if ( ( rc = expand_buffer ( buffer, data_end ) ) != 0 ) { DBGC ( buffer, "BUFFER %p could not expand :%s\n", buffer, strerror ( rc ) ); return rc; |