diff options
author | Christian Mauderer <Christian.Mauderer@embedded-brains.de> | 2016-07-29 16:04:42 +0200 |
---|---|---|
committer | Christian Mauderer <Christian.Mauderer@embedded-brains.de> | 2016-08-02 10:21:52 +0200 |
commit | 686583cba4f2701185077eab58800741398c3ac2 (patch) | |
tree | 153b47659898def269b7f932131b3f77c244968d /freebsd/contrib/pf/pfctl/pfctl_optimize.c | |
parent | pfctl: Add const and move static variables. (diff) | |
download | rtems-libbsd-686583cba4f2701185077eab58800741398c3ac2.tar.bz2 |
pfctl: Use static where possible.
Diffstat (limited to 'freebsd/contrib/pf/pfctl/pfctl_optimize.c')
-rw-r--r-- | freebsd/contrib/pf/pfctl/pfctl_optimize.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/freebsd/contrib/pf/pfctl/pfctl_optimize.c b/freebsd/contrib/pf/pfctl/pfctl_optimize.c index f7b78652..bc7bf91a 100644 --- a/freebsd/contrib/pf/pfctl/pfctl_optimize.c +++ b/freebsd/contrib/pf/pfctl/pfctl_optimize.c @@ -92,7 +92,11 @@ enum { COMBINED, /* the field may itself be combined with other rules */ DC, /* we just don't care about the field */ NEVER}; /* we should never see this field set?!? */ +#ifndef __rtems__ struct pf_rule_field { +#else /* __rtems__ */ +static struct pf_rule_field { +#endif /* __rtems__ */ const char *prf_name; int prf_type; size_t prf_offset; @@ -248,8 +252,14 @@ int superblock_inclusive(struct superblock *, struct pf_opt_rule *); void superblock_free(struct pfctl *, struct superblock *); +#ifndef __rtems__ int (*skip_comparitors[PF_SKIP_COUNT])(struct pf_rule *, struct pf_rule *); const char *skip_comparitors_names[PF_SKIP_COUNT]; +#else /* __rtems__ */ +static int (*skip_comparitors[PF_SKIP_COUNT])(struct pf_rule *, + struct pf_rule *); +static const char *skip_comparitors_names[PF_SKIP_COUNT]; +#endif /* __rtems__ */ #define PF_SKIP_COMPARITORS { \ { "ifp", PF_SKIP_IFP, skip_cmp_ifp }, \ { "dir", PF_SKIP_DIR, skip_cmp_dir }, \ @@ -261,8 +271,13 @@ const char *skip_comparitors_names[PF_SKIP_COUNT]; { "dport", PF_SKIP_DST_PORT, skip_cmp_dst_port } \ } +#ifndef __rtems__ struct pfr_buffer table_buffer; int table_identifier; +#else /* __rtems__ */ +static struct pfr_buffer table_buffer; +static int table_identifier; +#endif /* __rtems__ */ int |