From: David Levine Date: Sat, 29 Jul 2017 21:07:06 +0000 (-0400) Subject: Removed a local variable from m_Eom(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/d3e11c5e949fe00326e16f29191cf5d13fad0404?hp=5ed8cd671b27e1388c0c7e881805775a8e5b353a Removed a local variable from m_Eom(). Minor code simplification in preparation for upcoming fix. --- diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index e82a2fff..683db175 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -876,22 +876,20 @@ m_Eom (m_getfld_state_t s) char *cp; for (i = 0, cp = text; i < s->edelimlen; ++i, ++cp) { - int c2; - - if ((c2 = Getc (s)) == EOF) { + if ((*cp = Getc (s)) == EOF) { *cp = '\0'; break; } - *cp = c2; } if (i != s->edelimlen || strncmp (text, (char *)s->edelim, s->edelimlen)) { - if (i == 0 && s->msg_style == MS_MBOX) + if (i == 0 && s->msg_style == MS_MBOX) { /* the final newline in the (brain damaged) unix-format * maildrop is part of the delimiter - delete it. */ return 1; + } /* Did not find delimiter, so restore the read position. Note that on input, a character had already been read