diff options
-rw-r--r-- | lib/str.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -87,15 +87,6 @@ void _gnutls_buffer_clear(gnutls_buffer_st * str) #define MIN_CHUNK 1024 -static void align_allocd_with_data(gnutls_buffer_st * dest) -{ - assert(dest->allocd != NULL); - assert(dest->data != NULL); - if (dest->length) - memmove(dest->allocd, dest->data, dest->length); - dest->data = dest->allocd; -} - /** * gnutls_buffer_append_data: * @dest: the buffer to append to @@ -168,6 +159,15 @@ int _gnutls_buffer_resize(gnutls_buffer_st * dest, size_t new_size) #else +static void align_allocd_with_data(gnutls_buffer_st * dest) +{ + assert(dest->allocd != NULL); + assert(dest->data != NULL); + if (dest->length) + memmove(dest->allocd, dest->data, dest->length); + dest->data = dest->allocd; +} + int _gnutls_buffer_resize(gnutls_buffer_st * dest, size_t new_size) { if (unlikely(dest->data != NULL && dest->allocd == NULL)) |