summaryrefslogtreecommitdiffstats
path: root/freebsd/contrib/pf/pfctl/pfctl_radix.c
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2016-07-06 09:50:51 +0200
committerChristian Mauderer <Christian.Mauderer@embedded-brains.de>2016-08-02 10:21:51 +0200
commitc70221cb64185125b4fc97f9c2f15b6b4cf3cf3d (patch)
treef5f474b17bc57a04d29a45bd2d5dd4189612f407 /freebsd/contrib/pf/pfctl/pfctl_radix.c
parentpfctl: Match prototype. (diff)
downloadrtems-libbsd-c70221cb64185125b4fc97f9c2f15b6b4cf3cf3d.tar.bz2
pfctl: Add const and move static variables.
Note: This should be upstreamed into BSD. Make everything constant that can be constant and move static variables out of their functions.
Diffstat (limited to '')
-rw-r--r--freebsd/contrib/pf/pfctl/pfctl_radix.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/freebsd/contrib/pf/pfctl/pfctl_radix.c b/freebsd/contrib/pf/pfctl/pfctl_radix.c
index f074414d..573d12b9 100644
--- a/freebsd/contrib/pf/pfctl/pfctl_radix.c
+++ b/freebsd/contrib/pf/pfctl/pfctl_radix.c
@@ -403,7 +403,11 @@ pfi_get_ifaces(const char *filter, struct pfi_kif *buf, int *size)
/* buffer management code */
+#ifndef __rtems__
size_t buf_esize[PFRB_MAX] = { 0,
+#else /* __rtems__ */
+const size_t buf_esize[PFRB_MAX] = { 0,
+#endif /* __rtems__ */
sizeof(struct pfr_table), sizeof(struct pfr_tstats),
sizeof(struct pfr_addr), sizeof(struct pfr_astats),
sizeof(struct pfi_kif), sizeof(struct pfioc_trans_e)
@@ -536,10 +540,15 @@ pfr_buf_load(struct pfr_buffer *b, char *file, int nonetwork,
return (rv);
}
+#ifdef __rtems__
+static char next_ch = ' ';
+#endif /* __rtems__ */
int
pfr_next_token(char buf[BUF_SIZE], FILE *fp)
{
+#ifndef __rtems__
static char next_ch = ' ';
+#endif /* __rtems__ */
int i = 0;
for (;;) {