summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-11-26 19:57:53 +0000
committerkn <kn@cvs.openbsd.org>2019-11-26 19:57:53 +0000
commitac0c1fead8a80ee0dae06a8d24eed0813c935687 (patch)
treebd10ec57a8454eace9da36ad5593b2ce94633c86 /sys/net
parent367f04728e75d93cab1b6bfb1332fc8920eb4169 (diff)
Use proper NUL byte not zero with strings
No object change OK sashan
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pf_ioctl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c
index df798cd4205..909ca1a2aa6 100644
--- a/sys/net/pf_ioctl.c
+++ b/sys/net/pf_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_ioctl.c,v 1.346 2019/11/26 18:50:29 sashan Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.347 2019/11/26 19:57:52 kn Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1195,7 +1195,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
struct pf_rule *rule, *tail;
PF_LOCK();
- pr->anchor[sizeof(pr->anchor) - 1] = 0;
+ pr->anchor[sizeof(pr->anchor) - 1] = '\0';
ruleset = pf_find_ruleset(pr->anchor);
if (ruleset == NULL) {
error = EINVAL;
@@ -1292,7 +1292,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
struct pf_rule *tail;
PF_LOCK();
- pr->anchor[sizeof(pr->anchor) - 1] = 0;
+ pr->anchor[sizeof(pr->anchor) - 1] = '\0';
ruleset = pf_find_ruleset(pr->anchor);
if (ruleset == NULL) {
error = EINVAL;
@@ -1316,7 +1316,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
int i;
PF_LOCK();
- pr->anchor[sizeof(pr->anchor) - 1] = 0;
+ pr->anchor[sizeof(pr->anchor) - 1] = '\0';
ruleset = pf_find_ruleset(pr->anchor);
if (ruleset == NULL) {
error = EINVAL;
@@ -1939,7 +1939,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
struct pf_anchor *anchor;
PF_LOCK();
- pr->path[sizeof(pr->path) - 1] = 0;
+ pr->path[sizeof(pr->path) - 1] = '\0';
if ((ruleset = pf_find_ruleset(pr->path)) == NULL) {
error = EINVAL;
PF_UNLOCK();
@@ -1967,13 +1967,13 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
u_int32_t nr = 0;
PF_LOCK();
- pr->path[sizeof(pr->path) - 1] = 0;
+ pr->path[sizeof(pr->path) - 1] = '\0';
if ((ruleset = pf_find_ruleset(pr->path)) == NULL) {
error = EINVAL;
PF_UNLOCK();
break;
}
- pr->name[0] = 0;
+ pr->name[0] = '\0';
if (ruleset == &pf_main_ruleset) {
/* XXX kludge for pf_main_ruleset */
RB_FOREACH(anchor, pf_anchor_global, &pf_anchors)