git: e98d6da4ddf0 - main - pfctl: Avoid unneeded variable in gen_dynnode()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 03 Jul 2025 12:01:11 UTC
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);