summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-06-15 13:58:06 +0000
committerbrian <brian@FreeBSD.org>2001-06-15 13:58:06 +0000
commit0ec923a7cfdaf546193c61aba25d78e3b3908288 (patch)
treecead62a9b792ecc36b0187cdecd02ce0573f4981
parentcf75a40bc52f0c99f3605beabd037b0cc51c55dc (diff)
downloadFreeBSD-src-0ec923a7cfdaf546193c61aba25d78e3b3908288.zip
FreeBSD-src-0ec923a7cfdaf546193c61aba25d78e3b3908288.tar.gz
Correct the arg count after parsing a line with an unescaped # that isn't
preceeded with whitespace. MFC after: 3 weeks
-rw-r--r--usr.sbin/ppp/defs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/ppp/defs.c b/usr.sbin/ppp/defs.c
index 2924368..0e61f88 100644
--- a/usr.sbin/ppp/defs.c
+++ b/usr.sbin/ppp/defs.c
@@ -313,10 +313,9 @@ MakeArgs(char *script, char **pvect, int maxargs, int flags)
script = findblank(script, flags);
if (script == NULL)
return -1;
- else if (!(flags & PARSE_NOHASH) && *script == '#') {
+ else if (!(flags & PARSE_NOHASH) && *script == '#')
*script = '\0';
- nargs--;
- } else if (*script)
+ else if (*script)
*script++ = '\0';
}
}
OpenPOWER on IntegriCloud