Skip to content

Commit

Permalink
Reduce variable scope - send.c
Browse files Browse the repository at this point in the history
  • Loading branch information
fekir authored and flatcap committed Mar 8, 2018
1 parent 9e4e1d9 commit 08c7d0d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions send.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,9 @@ static void process_user_header(struct Envelope *env)

void mutt_forward_intro(struct Context *ctx, struct Header *cur, FILE *fp)
{
char buffer[LONG_STRING];

if (ForwardAttributionIntro)
{
char buffer[LONG_STRING];
setlocale(LC_TIME, NONULL(AttributionLocale));
mutt_make_string(buffer, sizeof(buffer), ForwardAttributionIntro, ctx, cur);
setlocale(LC_TIME, "");
Expand All @@ -391,10 +390,9 @@ void mutt_forward_intro(struct Context *ctx, struct Header *cur, FILE *fp)

void mutt_forward_trailer(struct Context *ctx, struct Header *cur, FILE *fp)
{
char buffer[LONG_STRING];

if (ForwardAttributionTrailer)
{
char buffer[LONG_STRING];
setlocale(LC_TIME, NONULL(AttributionLocale));
mutt_make_string(buffer, sizeof(buffer), ForwardAttributionTrailer, ctx, cur);
setlocale(LC_TIME, "");
Expand Down Expand Up @@ -443,9 +441,9 @@ static int include_forward(struct Context *ctx, struct Header *cur, FILE *out)

void mutt_make_attribution(struct Context *ctx, struct Header *cur, FILE *out)
{
char buffer[LONG_STRING];
if (Attribution)
{
char buffer[LONG_STRING];
setlocale(LC_TIME, NONULL(AttributionLocale));
mutt_make_string(buffer, sizeof(buffer), Attribution, ctx, cur);
setlocale(LC_TIME, "");
Expand All @@ -456,9 +454,9 @@ void mutt_make_attribution(struct Context *ctx, struct Header *cur, FILE *out)

void mutt_make_post_indent(struct Context *ctx, struct Header *cur, FILE *out)
{
char buffer[STRING];
if (PostIndentString)
{
char buffer[STRING];
mutt_make_string(buffer, sizeof(buffer), PostIndentString, ctx, cur);
fputs(buffer, out);
fputc('\n', out);
Expand Down Expand Up @@ -574,12 +572,12 @@ static int default_to(struct Address **to, struct Envelope *env, int flags, int

int mutt_fetch_recips(struct Envelope *out, struct Envelope *in, int flags)
{
char prompt[STRING];
struct Address *tmp = NULL;
int hmfupto = -1;

if ((flags & (SENDLISTREPLY | SENDGROUPREPLY)) && in->mail_followup_to)
{
char prompt[STRING];
snprintf(prompt, sizeof(prompt), _("Follow-up to %s%s?"),
in->mail_followup_to->mailbox, in->mail_followup_to->next ? ",..." : "");

Expand Down

0 comments on commit 08c7d0d

Please sign in to comment.