Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/pf/pfs lineno, states and allocated should be owned...



details:   https://anonhg.NetBSD.org/src/rev/eee77e49e46a
branches:  trunk
changeset: 971388:eee77e49e46a
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Apr 23 00:29:00 2020 +0000

description:
lineno, states and allocated should be owned by the parser

diffstat:

 usr.sbin/pf/pfs/parse.y  |  9 +++++++--
 usr.sbin/pf/pfs/parser.h |  8 ++++----
 2 files changed, 11 insertions(+), 6 deletions(-)

diffs (52 lines):

diff -r 29526c0c8923 -r eee77e49e46a usr.sbin/pf/pfs/parse.y
--- a/usr.sbin/pf/pfs/parse.y   Thu Apr 23 00:27:45 2020 +0000
+++ b/usr.sbin/pf/pfs/parse.y   Thu Apr 23 00:29:00 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.y,v 1.2 2013/10/19 17:16:38 christos Exp $ */
+/* $NetBSD: parse.y,v 1.3 2020/04/23 00:29:00 joerg Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: parse.y,v 1.2 2013/10/19 17:16:38 christos Exp $");
+__RCSID("$NetBSD: parse.y,v 1.3 2020/04/23 00:29:00 joerg Exp $");
 #endif
 
 #include <stdio.h>
@@ -50,6 +50,11 @@
 
 #include "parser.h"
 
+int lineno;
+
+struct pfioc_states* states;
+size_t allocated;
+
 // XXX it is really correct ?
 extern const char * const tcpstates[];
 
diff -r 29526c0c8923 -r eee77e49e46a usr.sbin/pf/pfs/parser.h
--- a/usr.sbin/pf/pfs/parser.h  Thu Apr 23 00:27:45 2020 +0000
+++ b/usr.sbin/pf/pfs/parser.h  Thu Apr 23 00:29:00 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parser.h,v 1.2 2011/08/31 13:32:39 joerg Exp $ */
+/* $NetBSD: parser.h,v 1.3 2020/04/23 00:29:00 joerg Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -34,9 +34,9 @@
 int parse(FILE*, struct pfioc_states*);
 int yyparse(void);
 
-int lineno;
+extern int lineno;
 
-struct pfioc_states* states;
-size_t allocated;
+extern struct pfioc_states* states;
+extern size_t allocated;
 
 #endif /* _PARSER_H_*/



Home | Main Index | Thread Index | Old Index