From: Kevin McCarthy Date: Wed, 23 Oct 2019 06:33:09 +0000 (+0800) Subject: Convert mutt_num_postponed() maildir check to use buffer pool. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80bc61db364b4e031a9789ce8c79a5f083fc8652;p=mutt Convert mutt_num_postponed() maildir check to use buffer pool. --- diff --git a/postpone.c b/postpone.c index 0ce25d30..edad66c4 100644 --- a/postpone.c +++ b/postpone.c @@ -113,15 +113,19 @@ int mutt_num_postponed (int force) { /* if we have a maildir mailbox, we need to stat the "new" dir */ - char buf[_POSIX_PATH_MAX]; + BUFFER *buf; - snprintf (buf, sizeof (buf), "%s/new", Postponed); - if (access (buf, F_OK) == 0 && stat (buf, &st) == -1) + buf = mutt_buffer_pool_get (); + mutt_buffer_printf (buf, "%s/new", Postponed); + if (access (mutt_b2s (buf), F_OK) == 0 && + stat (mutt_b2s (buf), &st) == -1) { PostCount = 0; LastModify = 0; + mutt_buffer_pool_release (&buf); return 0; } + mutt_buffer_pool_release (&buf); } if (LastModify < st.st_mtime)