diff options
| author | Pierre Pronchery <pierre@freebsdfoundation.org> | 2023-05-04 21:51:47 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2023-05-05 15:12:07 +0000 |
| commit | cf3e3d5bd0a1fae39c74c7db5a4e8b10732d0766 (patch) | |
| tree | 4c48b81a8fc4921e6e584787f31f0b80af5bcf32 /buffer.c | |
| parent | c6342fe2e90510d8d2296423f2ca92818a7b3d18 (diff) | |
Diffstat (limited to 'buffer.c')
| -rw-r--r-- | buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -63,6 +63,7 @@ ldns_buffer_set_capacity(ldns_buffer *buffer, size_t capacity) ldns_buffer_invariant(buffer); assert(buffer->_position <= capacity); + assert(!buffer->_fixed); data = (uint8_t *) LDNS_XREALLOC(buffer->_data, uint8_t, capacity); if (!data) { @@ -79,7 +80,6 @@ bool ldns_buffer_reserve(ldns_buffer *buffer, size_t amount) { ldns_buffer_invariant(buffer); - assert(!buffer->_fixed); if (buffer->_capacity < buffer->_position + amount) { size_t new_capacity = buffer->_capacity * 3 / 2; |
