Date: Thu, 3 Jul 2025 12:01:11 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: e98d6da4ddf0 - main - pfctl: Avoid unneeded variable in gen_dynnode() Message-ID: <202507031201.563C1BMW052078@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e98d6da4ddf0c1cd2bec83a27abe7590289632f1 commit e98d6da4ddf0c1cd2bec83a27abe7590289632f1 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2025-06-27 15:17:44 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2025-07-03 07:16:14 +0000 pfctl: Avoid unneeded variable in gen_dynnode() OK bluhm Obtained from: OpenBSD, kn <kn@openbsd.org>, 9e1cf8ac88 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_parser.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index de3048b27a47..dfcf1a7b62a0 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1387,7 +1387,6 @@ struct node_host * gen_dynnode(struct node_host *h, sa_family_t af) { struct node_host *n; - struct pf_addr *m; if (h->addr.type != PF_ADDR_DYNIFTL) return (NULL); @@ -1400,8 +1399,7 @@ gen_dynnode(struct node_host *h, sa_family_t af) n->tail = NULL; /* fix up netmask */ - m = &n->addr.v.a.mask; - if (af == AF_INET && unmask(m) > 32) + if (af == AF_INET && unmask(&n->addr.v.a.mask) > 32) set_ipmask(n, 32); return (n);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507031201.563C1BMW052078>