]> Pileus Git - ~andy/fetchmail/commitdiff
Another step towards correct handling of bodiless messages.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 5 Jun 1997 20:35:13 +0000 (20:35 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 5 Jun 1997 20:35:13 +0000 (20:35 -0000)
svn path=/trunk/; revision=1066

driver.c

index be0f394761d13349cd4afa14c63bbab78aed487f..cf58c145b924fde420a47242194a702d7c4fc1ab 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -454,14 +454,13 @@ char *realname;           /* real name of host */
     sizeticker = 0;
     has_nuls = FALSE;
     return_path[0] = '\0';
-    remaining = len;
     olderrs = ctl->errcount;
 
     /* read message headers */
     headers = received_for = NULL;
     from_offs = to_offs = cc_offs = bcc_offs = ctt_offs = env_offs = -1;
     oldlen = 0;
-    for (;;)
+    for (remaining = len; remaining > 0; remaining -= linelen)
     {
        char *line;
 
@@ -509,8 +508,6 @@ char *realname;             /* real name of host */
        if (linelen != strlen(line))
            has_nuls = TRUE;
 
-       remaining -= linelen;
-
        /* check for end of headers; don't save terminating line */
        if (line[0] == '\r' && line[1] == '\n')
        {