From 6d35b226f2158cfcf8a16266ba25c30034c3c6ce Mon Sep 17 00:00:00 2001 From: henning <> Date: Fri, 17 Oct 2008 14:32:47 +0000 Subject: [PATCH] bring in findeol() fix from pfctl --- src/usr.sbin/ntpd/parse.y | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y index d61d6eee..38673be5 100644 --- a/src/usr.sbin/ntpd/parse.y +++ b/src/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 @@ -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;