From: Richard Russon Date: Fri, 12 Apr 2019 13:41:28 +0000 (+0100) Subject: tidy: mutt_copy_hdr() X-Git-Tag: 2019-10-25~267^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a24cfcec36b3dc303fbcb534e0acce03b7c160af;p=neomutt tidy: mutt_copy_hdr() --- diff --git a/copy.c b/copy.c index a039343c0..9beab96fc 100644 --- a/copy.c +++ b/copy.c @@ -343,9 +343,10 @@ int mutt_copy_hdr(FILE *fp_in, FILE *fp_out, LOFF_T off_start, LOFF_T off_end, * decoding may have concatenated lines. */ if (chflags & (CH_DECODE | CH_PREFIX)) { - if (mutt_write_one_header( - fp_out, 0, headers[x], (chflags & CH_PREFIX) ? prefix : 0, - mutt_window_wrap_cols(MuttIndexWindow, C_Wrap), chflags) == -1) + const char *pre = (chflags & CH_PREFIX) ? prefix : NULL; + const int wraplen = mutt_window_wrap_cols(MuttIndexWindow, C_Wrap); + + if (mutt_write_one_header(fp_out, 0, headers[x], pre, wraplen, chflags) == -1) { error = true; break;