diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2008-10-17 14:32:48 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2008-10-17 14:32:48 +0000 |
commit | 0192dc69f688eb08635287c5fba73fc56ac6c2f2 (patch) | |
tree | dc4cfcee15df08572157ad54e7a892607a31f66d /usr.sbin/dvmrpd | |
parent | db005313de84af498505b516b9c0059e36c7f07e (diff) |
bring in findeol() fix from pfctl
Diffstat (limited to 'usr.sbin/dvmrpd')
-rw-r--r-- | usr.sbin/dvmrpd/parse.y | 8 |
1 files changed, 5 insertions, 3 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; |