aboutsummaryrefslogtreecommitdiffstats
path: root/netrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'netrc.c')
-rw-r--r--netrc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/netrc.c b/netrc.c
index a5263c41..3d20ae97 100644
--- a/netrc.c
+++ b/netrc.c
@@ -115,12 +115,11 @@ parse_netrc (file)
/* While there are lines in the file... */
while (fgets(buf, POPBUFSIZE, fp))
{
- ln ++;
+ ln++;
/* Strip trailing CRLF */
- p = buf + strlen(buf) - 1;
- while ((p > buf) && *p && isspace(*p))
- *p-- = '\0';
+ for (p = buf + strlen(buf) - 1; (p >= buf) && isspace(*p); p--)
+ *p = '\0';
/* Parse the line. */
p = buf;