]> sjero.net Git - wget/commitdiff
[svn] Skip initial whitespace before testing for EOL.
authorhniksic <devnull@localhost>
Thu, 17 Jan 2002 00:59:13 +0000 (16:59 -0800)
committerhniksic <devnull@localhost>
Thu, 17 Jan 2002 00:59:13 +0000 (16:59 -0800)
Submitted in <sxsu1tl6bf2.fsf@florida.arsdigita.de>.

src/ChangeLog
src/netrc.c

index ede9eae03e49a8dfa4bf47b2efe24a9d94db0156..712d8c73ae58198133a4390ce9f7f71cd2424877 100644 (file)
@@ -1,3 +1,9 @@
+2002-01-17  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * netrc.c (parse_netrc): Skip leading whitespace before testing
+       whether the line is empty.  Empty lines still contain the line
+       terminator.
+
 2002-01-15  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * gen_sslfunc.c (ssl_iread): Call select on the file descriptor
index 4b3d2b40a83050302feb50bff98d396181e5a64d..b358936a7d8e11d9814193f13d8612741e490ee4 100644 (file)
@@ -280,6 +280,10 @@ parse_netrc (const char *path)
       p = line;
       quote = 0;
 
+      /* Skip leading whitespace.  */
+      while (*p && ISSPACE (*p))
+       p ++;
+
       /* If the line is empty, then end any macro definition.  */
       if (last_token == tok_macdef && !*p)
        /* End of macro if the line is empty.  */