git: 8bbb1f4ce7a2 - stable/13 - ip_htable: fix -Wtautological-pointer-compare warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 10 Aug 2025 05:55:40 UTC
The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=8bbb1f4ce7a28236bcdce072c2113c43a2a7acd0 commit 8bbb1f4ce7a28236bcdce072c2113c43a2a7acd0 Author: Siva Mahadevan <me@svmhdvn.name> AuthorDate: 2025-04-24 12:08:47 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2025-08-10 05:55:15 +0000 ip_htable: fix -Wtautological-pointer-compare warnings This also fixes a few other trivial -Wunused-but-set-variable warnings. Pull Request: https://github.com/freebsd/freebsd-src/pull/1677 MFC after: 1 month (cherry picked from commit e4c864e5550544e5ff7e395309c5098d84058403) --- sys/netpfil/ipfilter/netinet/ip_htable.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_htable.c b/sys/netpfil/ipfilter/netinet/ip_htable.c index 1119deb031a4..b47a1aa2d795 100644 --- a/sys/netpfil/ipfilter/netinet/ip_htable.c +++ b/sys/netpfil/ipfilter/netinet/ip_htable.c @@ -608,7 +608,7 @@ ipf_htent_remove(ipf_main_softc_t *softc, void *arg, iphtable_t *iph, switch (iph->iph_type & ~IPHASH_ANON) { case IPHASH_GROUPMAP : - if (ipe->ipe_group != NULL) + if (ipe->ipe_ptr != NULL) ipf_group_del(softc, ipe->ipe_ptr, NULL); break; @@ -978,7 +978,6 @@ ipf_htent_find(iphtable_t *iph, iphtent_t *ipeo) { iphtent_t ipe, *ent; u_int hv; - int bits; bcopy((char *)ipeo, (char *)&ipe, sizeof(ipe)); ipe.ipe_addr.i6[0] &= ipe.ipe_mask.i6[0]; @@ -986,7 +985,6 @@ ipf_htent_find(iphtable_t *iph, iphtent_t *ipeo) ipe.ipe_addr.i6[2] &= ipe.ipe_mask.i6[2]; ipe.ipe_addr.i6[3] &= ipe.ipe_mask.i6[3]; if (ipe.ipe_family == AF_INET) { - bits = count4bits(ipe.ipe_mask.in4_addr); ipe.ipe_addr.i6[1] = 0; ipe.ipe_addr.i6[2] = 0; ipe.ipe_addr.i6[3] = 0; @@ -998,7 +996,6 @@ ipf_htent_find(iphtable_t *iph, iphtent_t *ipeo) } else #ifdef USE_INET6 if (ipe.ipe_family == AF_INET6) { - bits = count6bits(ipe.ipe_mask.i6); hv = IPE_V6_HASH_FN(ipe.ipe_addr.i6, ipe.ipe_mask.i6, iph->iph_size); } else