Hi Kevin,

On Sun, Jan 25, 2026 at 06:30:24PM +0800, Kevin J. McCarthy wrote:
> This just helps make the code a bit more readable.
> ---
>  mbox.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mbox.c b/mbox.c
> index 2a266da7..2e27916e 100644
> --- a/mbox.c
> +++ b/mbox.c
> @@ -551,7 +551,7 @@ static int mbox_close_message (CONTEXT *ctx, MESSAGE *msg)
>  
>  static int mbox_commit_message (CONTEXT *ctx, MESSAGE *msg)
>  {
> -  if (fputc ('\n', msg->fp) == EOF)
> +  if (fputs (MBOX_SEP, msg->fp) == EOF)

This is incorrect: fputs(3) prints a newline character at the end of the
string, so this would print "\n\n" (one from MBOX_SEP, and one from
fputs(3)).


Have a lovely day!
Alex

>      return -1;
>  
>    if ((fflush (msg->fp) == EOF) ||
> @@ -1039,7 +1039,7 @@ static int mbox_sync_mailbox (CONTEXT *ctx, int 
> *index_hint)
>         }
>         break;
>       default:
> -       if (fputs("\n", fp) == EOF)
> +       if (fputs (MBOX_SEP, fp) == EOF)
>         {
>           mutt_perror (mutt_b2s (tempfile));
>           mutt_sleep (5);
> -- 
> 2.52.0
> 

-- 
<https://www.alejandro-colomar.es>

Attachment: signature.asc
Description: PGP signature

Reply via email to