From df02c8047163d09cfd77a6732070cec251a10ad8 Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Sun, 22 Jul 2012 11:15:30 -0700 Subject: [PATCH] mutt_buffer_init: just memset the buffer (closes #3588) This was meant to be part of the previous commit. --- muttlib.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/muttlib.c b/muttlib.c index 725a105d..7e93a3a2 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1657,21 +1657,8 @@ BUFFER *mutt_buffer_new(void) { return b; } -/* - * Creates and initializes a BUFFER*. If passed an existing BUFFER*, - * just initializes. Frees anything already in the buffer. - * - * Disregards the 'destroy' flag, which seems reserved for caller. - * This is bad, but there's no apparent protocol for it. - */ +/* initialize a new BUFFER */ BUFFER *mutt_buffer_init (BUFFER *b) { - if (!b) { - b = safe_malloc(sizeof(BUFFER)); - if (!b) - return NULL ; - } else { - FREE(&b->data); - } memset(b, 0, sizeof(BUFFER)); return b; } -- 2.40.0