summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/dvmrpd/parse.y8
-rw-r--r--usr.sbin/ntpd/parse.y8
2 files changed, 10 insertions, 6 deletions
diff --git a/usr.sbin/dvmrpd/parse.y b/usr.sbin/dvmrpd/parse.y
index ae20108cccf..9101beb9b0c 100644
--- a/usr.sbin/dvmrpd/parse.y
+++ b/usr.sbin/dvmrpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.16 2008/07/02 08:52:30 norby Exp $ */
+/* $OpenBSD: parse.y,v 1.17 2008/10/17 14:32:47 henning Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -479,11 +479,13 @@ findeol(void)
int c;
parsebuf = NULL;
- pushback_index = 0;
/* skip to either EOF or the first real EOL */
while (1) {
- c = lgetc(0);
+ if (pushback_index)
+ c = pushback_buffer[--pushback_index];
+ else
+ c = lgetc(0);
if (c == '\n') {
file->lineno++;
break;
diff --git a/usr.sbin/ntpd/parse.y b/usr.sbin/ntpd/parse.y
index d61d6eee125..38673be50ba 100644
--- a/usr.sbin/ntpd/parse.y
+++ b/usr.sbin/ntpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.44 2008/06/09 18:26:35 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.45 2008/10/17 14:32:47 henning Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -419,11 +419,13 @@ findeol(void)
int c;
parsebuf = NULL;
- pushback_index = 0;
/* skip to either EOF or the first real EOL */
while (1) {
- c = lgetc(0);
+ if (pushback_index)
+ c = pushback_buffer[--pushback_index];
+ else
+ c = lgetc(0);
if (c == '\n') {
file->lineno++;
break;