From fb2ed23830b6e58646fef7679f0af56ce17eacfd Mon Sep 17 00:00:00 2001 From: hniksic Date: Wed, 16 Jan 2002 16:59:13 -0800 Subject: [PATCH] [svn] Skip initial whitespace before testing for EOL. Submitted in . --- src/ChangeLog | 6 ++++++ src/netrc.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index ede9eae0..712d8c73 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2002-01-17 Hrvoje Niksic + + * 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 * gen_sslfunc.c (ssl_iread): Call select on the file descriptor diff --git a/src/netrc.c b/src/netrc.c index 4b3d2b40..b358936a 100644 --- a/src/netrc.c +++ b/src/netrc.c @@ -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. */