summaryrefslogtreecommitdiff
path: root/usr.sbin/ypldap
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2010-08-03 18:42:42 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2010-08-03 18:42:42 +0000
commit7bc2dad85529088f40d8965e75640e4d7ad0e2a1 (patch)
tree571edffb921101008678dbdcc3529a56d99a4238 /usr.sbin/ypldap
parent4238ae5ce04e5ffc9016a116ff9c86afc5b4fae3 (diff)
fix linecount bug with comments spanning multiple lines
problem reported with the obvious fix for bgpd by Sebastian Benoit <benoit-lists at fb12.de>, also PR 6432 applied to all the others by yours truly. ok theo isn't it amazing how far this parser (and more) spread?
Diffstat (limited to 'usr.sbin/ypldap')
-rw-r--r--usr.sbin/ypldap/parse.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ypldap/parse.y b/usr.sbin/ypldap/parse.y
index 5264bf42506..d70e821eb1e 100644
--- a/usr.sbin/ypldap/parse.y
+++ b/usr.sbin/ypldap/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.8 2009/03/31 21:03:49 tobias Exp $ */
+/* $OpenBSD: parse.y,v 1.9 2010/08/03 18:42:41 henning Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -538,9 +538,10 @@ top:
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';