From a24cfcec36b3dc303fbcb534e0acce03b7c160af Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Fri, 12 Apr 2019 14:41:28 +0100 Subject: [PATCH] tidy: mutt_copy_hdr() --- copy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.40.0