summaryrefslogtreecommitdiffstats
path: root/freebsd/contrib/pf/pfctl/pfctl_osfp.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_osfp.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 'freebsd/contrib/pf/pfctl/pfctl_osfp.c')
-rw-r--r--freebsd/contrib/pf/pfctl/pfctl_osfp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/freebsd/contrib/pf/pfctl/pfctl_osfp.c b/freebsd/contrib/pf/pfctl/pfctl_osfp.c
index 541ac3b9..b4ac0e01 100644
--- a/freebsd/contrib/pf/pfctl/pfctl_osfp.c
+++ b/freebsd/contrib/pf/pfctl/pfctl_osfp.c
@@ -1010,7 +1010,18 @@ get_field(char **line, size_t *len, int *fieldlen)
const char *
print_ioctl(struct pf_osfp_ioctl *fp)
{
+#ifndef __rtems__
static char buf[1024];
+#else /* __rtems__ */
+ /* Note on RTEMS port:
+ * This buffer is static. So normally it would have to be initialized to
+ * zero every time the program starts. But in this special case it is
+ * set to zero inside the function. Therefore it is not necessary to
+ * move it. If it would be moved out of the function, the name would
+ * have to be changed. This would be a lot of change in this function!
+ */
+ static char buf[1024];
+#endif /* __rtems__ */
char tmp[32];
int i, opt;