From 94c97b180b58fa07bb00c9acf6650c4aece2b04e Mon Sep 17 00:00:00 2001 From: mbuhl Date: Wed, 27 Jul 2022 12:28:27 +0000 Subject: [PATCH] Remove redundant bzero, the pfctl struct memset later on. Also memset the pfctl struct in pfctl_reset. OK jan@ --- sbin/pfctl/pfctl.c | 4 ++-- 1 file 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); -- 2.20.1