From 029fb73afa9e5de760a0ab534060ddc912bd1758 Mon Sep 17 00:00:00 2001 From: henning <> Date: Tue, 3 Aug 2010 18:42:40 +0000 Subject: [PATCH] fix linecount bug with comments spanning multiple lines problem reported with the obvious fix for bgpd by Sebastian Benoit , also PR 6432 applied to all the others by yours truly. ok theo isn't it amazing how far this parser (and more) spread? --- src/usr.sbin/ntpd/parse.y | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y index 35432d60..5751682b 100644 --- a/src/usr.sbin/ntpd/parse.y +++ b/src/usr.sbin/ntpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.46 2009/03/31 21:03:48 tobias Exp $ */ +/* $OpenBSD: parse.y,v 1.47 2010/08/03 18:42:40 henning Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -468,9 +468,10 @@ yylex(void) return (0); if (next == quotec || c == ' ' || c == '\t') c = next; - else if (next == '\n') + else if (next == '\n') { + file->lineno++; continue; - else + } else lungetc(next); } else if (c == quotec) { *p = '\0';