summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/defs.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2000-03-28 15:14:15 +0000
committerbrian <brian@FreeBSD.org>2000-03-28 15:14:15 +0000
commit2442f64e8a401a60a2f9a9a5a2e1083b7a8e4369 (patch)
treed44121edc9798f1892bbe4c3bc5cab1de6b32222 /usr.sbin/ppp/defs.c
parent7d12e186432375cd7e9c69e1df8c498686ceec58 (diff)
downloadFreeBSD-src-2442f64e8a401a60a2f9a9a5a2e1083b7a8e4369.zip
FreeBSD-src-2442f64e8a401a60a2f9a9a5a2e1083b7a8e4369.tar.gz
don't treat # specially if PARSE_NOHASH is passed
Diffstat (limited to 'usr.sbin/ppp/defs.c')
-rw-r--r--usr.sbin/ppp/defs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/defs.c b/usr.sbin/ppp/defs.c
index 32e445b..4ea017a 100644
--- a/usr.sbin/ppp/defs.c
+++ b/usr.sbin/ppp/defs.c
@@ -297,7 +297,7 @@ MakeArgs(char *script, char **pvect, int maxargs, int flags)
int nargs;
nargs = 0;
- while (*script && *script != '#') {
+ while (*script && (*script != '#' || (flags & PARSE_NOHASH))) {
script += strspn(script, " \t");
if (*script) {
if (nargs >= maxargs - 1)
@@ -307,7 +307,7 @@ MakeArgs(char *script, char **pvect, int maxargs, int flags)
script = findblank(script, flags);
if (script == NULL)
return -1;
- else if (*script == '#')
+ else if (!(flags & PARSE_NOHASH) && *script == '#')
*script = '\0';
else if (*script)
*script++ = '\0';
OpenPOWER on IntegriCloud