summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2020-07-03 17:58:10 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2020-07-03 17:58:10 +0000
commit2e4afbeddc0e01327bcb3a57164223728cf152a0 (patch)
tree6937599261edd779f08493f1c9b3f4d1ec3cf46b /usr.sbin
parent767bdea8e7c402fcbc96bb313bb7971c51e2f36c (diff)
Increment line number when skipping multi-line comments.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/btrace/bt_parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/btrace/bt_parse.y b/usr.sbin/btrace/bt_parse.y
index 02407d4062c..e8530fd1615 100644
--- a/usr.sbin/btrace/bt_parse.y
+++ b/usr.sbin/btrace/bt_parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: bt_parse.y,v 1.14 2020/06/22 13:14:47 kn Exp $ */
+/* $OpenBSD: bt_parse.y,v 1.15 2020/07/03 17:58:09 mpi Exp $ */
/*
* Copyright (c) 2019 - 2020 Martin Pieuchot <mpi@openbsd.org>
@@ -592,6 +592,8 @@ again:
for (pc = 0, c = lgetc(); c != EOF; c = lgetc()) {
if (pc == '*' && c == '/')
goto again;
+ else if (c == '\n')
+ yylval.lineno++;
pc = c;
}
}