summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Buhl <mbuhl@cvs.openbsd.org>2022-07-27 12:28:28 +0000
committerMoritz Buhl <mbuhl@cvs.openbsd.org>2022-07-27 12:28:28 +0000
commitae6f1c9408b897dc303c37a14b0a441c5bd2c5e3 (patch)
treefe6a7c5695b3d680398b0f156587ac41f64a3f5f
parentf0afd5ce5ff3fb799e6521fc8abb0e3ec5f3cf5e (diff)
Remove redundant bzero, the pfctl struct memset later on.
Also memset the pfctl struct in pfctl_reset. OK jan@
-rw-r--r--sbin/pfctl/pfctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 4794c63e473..9f14b955ca7 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl.c,v 1.387 2022/07/21 05:26:10 mbuhl Exp $ */
+/* $OpenBSD: pfctl.c,v 1.388 2022/07/27 12:28:27 mbuhl Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1541,7 +1541,6 @@ pfctl_rules(int dev, char *filename, int opts, int optimize,
int osize;
char *p;
- bzero(&pf, sizeof(pf));
RB_INIT(&pf_anchors);
memset(&pf_main_anchor, 0, sizeof(pf_main_anchor));
pf_init_ruleset(&pf_main_anchor.ruleset);
@@ -2429,6 +2428,7 @@ pfctl_reset(int dev, int opts)
struct pfr_buffer t;
int i;
+ memset(&pf, 0, sizeof(pf));
pf.dev = dev;
pfctl_init_options(&pf);