summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>2000-03-28 15:14:15 +0000
committerbrian <brian@cvs.openbsd.org>2000-03-28 15:14:15 +0000
commit16ecdc66c47a6224cb52cd6bb98ced4322762a06 (patch)
tree85577785c5f7a93a7720d3187518b145bec6551a
parent8b05732b8c45604a1855376f61213ae91e0911c0 (diff)
don't treat # specially if PARSE_NOHASH is passed
-rw-r--r--usr.sbin/ppp/ppp/defs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ppp/ppp/defs.c b/usr.sbin/ppp/ppp/defs.c
index e501f860859..c8b438a6f53 100644
--- a/usr.sbin/ppp/ppp/defs.c
+++ b/usr.sbin/ppp/ppp/defs.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: defs.c,v 1.10 2000/02/27 01:38:25 brian Exp $
+ * $OpenBSD: defs.c,v 1.11 2000/03/28 15:14:14 brian Exp $
*/
@@ -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';