summaryrefslogtreecommitdiffstats
path: root/freebsd/contrib/pf/pfctl/pfctl.c
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2016-07-29 16:04:42 +0200
committerChristian Mauderer <Christian.Mauderer@embedded-brains.de>2016-08-02 10:21:52 +0200
commit686583cba4f2701185077eab58800741398c3ac2 (patch)
tree153b47659898def269b7f932131b3f77c244968d /freebsd/contrib/pf/pfctl/pfctl.c
parentpfctl: Add const and move static variables. (diff)
downloadrtems-libbsd-686583cba4f2701185077eab58800741398c3ac2.tar.bz2
pfctl: Use static where possible.
Diffstat (limited to 'freebsd/contrib/pf/pfctl/pfctl.c')
-rw-r--r--freebsd/contrib/pf/pfctl/pfctl.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/freebsd/contrib/pf/pfctl/pfctl.c b/freebsd/contrib/pf/pfctl/pfctl.c
index e7597e32..42adc69d 100644
--- a/freebsd/contrib/pf/pfctl/pfctl.c
+++ b/freebsd/contrib/pf/pfctl/pfctl.c
@@ -114,6 +114,7 @@ const char *pfctl_lookup_option(char *, const char **);
const char *pfctl_lookup_option(char *, const char * const *);
#endif /* __rtems__ */
+#ifndef __rtems__
struct pf_anchor_global pf_anchors;
struct pf_anchor pf_main_anchor;
@@ -123,11 +124,7 @@ const char *showopt;
const char *debugopt;
char *anchoropt;
const char *optiopt = NULL;
-#ifndef __rtems__
char *pf_device = "/dev/pf";
-#else /* __rtems__ */
-const char *pf_device = "/dev/pf";
-#endif /* __rtems__ */
char *ifaceopt;
char *tableopt;
const char *tblcmdopt;
@@ -135,12 +132,36 @@ int src_node_killers;
char *src_node_kill[2];
int state_killers;
char *state_kill[2];
+#else /* __rtems__ */
+static struct pf_anchor_global pf_anchors;
+static struct pf_anchor pf_main_anchor;
+
+static const char *clearopt;
+static char *rulesopt;
+static const char *showopt;
+static const char *debugopt;
+static char *anchoropt;
+static const char *optiopt = NULL;
+static const char *pf_device = "/dev/pf";
+static char *ifaceopt;
+static char *tableopt;
+static const char *tblcmdopt;
+static int src_node_killers;
+static char *src_node_kill[2];
+static int state_killers;
+static char *state_kill[2];
+#endif /* __rtems__ */
int loadopt;
int altqsupport;
int dev = -1;
+#ifndef __rtems__
int first_title = 1;
int labels = 0;
+#else /* __rtems__ */
+static int first_title = 1;
+static int labels = 0;
+#endif /* __rtems__ */
#define INDENT(d, o) do { \
if (o) { \