]> granicus.if.org Git - neomutt/commitdiff
tidy: mutt_copy_hdr()
authorRichard Russon <rich@flatcap.org>
Fri, 12 Apr 2019 13:41:28 +0000 (14:41 +0100)
committerRichard Russon <rich@flatcap.org>
Sun, 14 Apr 2019 15:44:26 +0000 (16:44 +0100)
copy.c

diff --git a/copy.c b/copy.c
index a039343c091662505374bb60b44eade4b813795f..9beab96fcfe4b03d6bfcd3d6a0f1fcf24ccdc540 100644 (file)
--- 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;