summaryrefslogtreecommitdiffstats
path: root/usr.sbin/hostapd
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2010-08-03 18:42:40 +0000
committerhenning <henning@openbsd.org>2010-08-03 18:42:40 +0000
commitdaf2411017fac3832089636bcea5582a27f7614d (patch)
tree8f3d780b9e0d6b10c944b5852a79db2e36af792d /usr.sbin/hostapd
parentBring the suspend/resume code of all the Intel wireless drivers in line with (diff)
downloadwireguard-openbsd-daf2411017fac3832089636bcea5582a27f7614d.tar.xz
wireguard-openbsd-daf2411017fac3832089636bcea5582a27f7614d.zip
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/hostapd')
-rw-r--r--usr.sbin/hostapd/parse.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/hostapd/parse.y b/usr.sbin/hostapd/parse.y
index ed1fcb6ec44..85222f1bdc2 100644
--- a/usr.sbin/hostapd/parse.y
+++ b/usr.sbin/hostapd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.42 2010/01/11 03:55:21 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.43 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Reyk Floeter <reyk@openbsd.org>
@@ -1476,9 +1476,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';