X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=buffer.c;h=bfa0dd82b9e74c3202bae2053a6b76462fbc100b;hp=cfe19be62455be1f3c668577123deab706d376f0;hb=9e6ab0152703ad301042ce8810859f41fbee405a;hpb=8e037c67a88cb4680c4391134c578e3b55a80f8a diff --git a/buffer.c b/buffer.c index cfe19be..bfa0dd8 100644 --- a/buffer.c +++ b/buffer.c @@ -18,7 +18,6 @@ #include "buffer.h" -#include "lib/mem.h" #include "lib/str.h" #include "lib/debug.h" @@ -86,14 +85,14 @@ void mutt_buffer_free (BUFFER ** p) /* dynamically grows a BUFFER to accomodate s, in increments of 128 bytes. * Always one byte bigger than necessary for the null terminator, and * the buffer is always null-terminated */ -void mutt_buffer_add (BUFFER * buf, const char *s, size_t len) +void mutt_buffer_add (BUFFER *buf, const char *s, size_t len) { size_t offset; if (buf->dptr + len + 1 > buf->data + buf->dsize) { offset = buf->dptr - buf->data; buf->dsize += len < 128 ? 128 : len + 1; - mem_realloc ((void **) &buf->data, buf->dsize); + p_realloc(&buf->data, buf->dsize); buf->dptr = buf->data + offset; } memcpy (buf->dptr, s, len);