aboutsummaryrefslogtreecommitdiff
path: root/sys/netpfil
diff options
context:
space:
mode:
authorSiva Mahadevan <siva@FreeBSD.org>2026-09-09 17:14:45 +0000
committerSiva Mahadevan <siva@FreeBSD.org>2026-09-10 14:34:56 +0000
commit94f7019668f8a02416c5b32ba8a9c32a68edd261 (patch)
tree8d5d0fd8314fc22148692f3aa1082dee6d281ae8 /sys/netpfil
parentf02f93e79147f8f8ef536d9696d6cb29e08592cd (diff)
ipfilter: remove unused variable
This fixes the build with gcc 16 after the changes to -Wunused*[0]. [0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused Reviewed by: cy MFC after: 3 days Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/netpfil')
-rw-r--r--sys/netpfil/ipfilter/netinet/ip_nat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c
index 9ee1c5d24ed1..b7f5eb94b1dd 100644
--- a/sys/netpfil/ipfilter/netinet/ip_nat.c
+++ b/sys/netpfil/ipfilter/netinet/ip_nat.c
@@ -5807,14 +5807,13 @@ ipf_nat_expire(ipf_main_softc_t *softc)
ipf_nat_softc_t *softn = softc->ipf_nat_soft;
ipftq_t *ifq, *ifqnext;
ipftqent_t *tqe, *tqn;
- int i;
SPL_INT(s);
SPL_NET(s);
WRITE_ENTER(&softc->ipf_nat);
- for (ifq = softn->ipf_nat_tcptq, i = 0; ifq != NULL;
+ for (ifq = softn->ipf_nat_tcptq; ifq != NULL;
ifq = ifq->ifq_next) {
- for (tqn = ifq->ifq_head; ((tqe = tqn) != NULL); i++) {
+ for (tqn = ifq->ifq_head; (tqe = tqn) != NULL;) {
if (tqe->tqe_die > softc->ipf_ticks)
break;
tqn = tqe->tqe_next;
@@ -5823,7 +5822,7 @@ ipf_nat_expire(ipf_main_softc_t *softc)
}
for (ifq = softn->ipf_nat_utqe; ifq != NULL; ifq = ifq->ifq_next) {
- for (tqn = ifq->ifq_head; ((tqe = tqn) != NULL); i++) {
+ for (tqn = ifq->ifq_head; (tqe = tqn) != NULL;) {
if (tqe->tqe_die > softc->ipf_ticks)
break;
tqn = tqe->tqe_next;