]> diplodocus.org Git - nmh/commitdiff
Removed a local variable from m_Eom().
authorDavid Levine <levinedl@acm.org>
Sat, 29 Jul 2017 21:07:06 +0000 (17:07 -0400)
committerDavid Levine <levinedl@acm.org>
Sat, 29 Jul 2017 21:07:06 +0000 (17:07 -0400)
Minor code simplification in preparation for upcoming fix.

sbr/m_getfld.c

index e82a2ff..683db17 100644 (file)
@@ -876,22 +876,20 @@ m_Eom (m_getfld_state_t s)
     char *cp;
 
     for (i = 0, cp = text; i < s->edelimlen; ++i, ++cp) {
     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 = '\0';
            break;
        }
-        *cp = c2;
     }
 
     if (i != s->edelimlen  ||
         strncmp (text, (char *)s->edelim, s->edelimlen)) {
     }
 
     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;
            /* 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
 
        /* Did not find delimiter, so restore the read position.
           Note that on input, a character had already been read