From 203257027fcca8a04afb5cd0b7c6cff0a3642af4 Mon Sep 17 00:00:00 2001 From: Daniel Hartmeier Date: Wed, 17 Apr 2002 19:06:19 +0000 Subject: Reset lineno for each file, so pfctl -R ... -N ... reports the right line number for non-first files. Reported by aaron@ --- sbin/pfctl/parse.y | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sbin/pfctl/parse.y') diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 9b186b68e4f..3d871e0d052 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.57 2002/03/27 18:16:22 mickey Exp $ */ +/* $OpenBSD: parse.y,v 1.58 2002/04/17 19:06:18 dhartmei Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -1713,6 +1713,7 @@ parse_rules(FILE *input, struct pfctl *xpf) natmode = 0; fin = input; pf = xpf; + lineno = 1; errors = 0; yyparse(); return (errors ? -1 : 0); @@ -1724,6 +1725,7 @@ parse_nat(FILE *input, struct pfctl *xpf) natmode = 1; fin = input; pf = xpf; + lineno = 1; errors = 0; yyparse(); return (errors ? -1 : 0); -- cgit v1.2.3