git: 3922d7f62778 - stable/14 - ip_htable: fix -Wtautological-pointer-compare warnings

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Sun, 10 Aug 2025 05:24:52 UTC
The branch stable/14 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=3922d7f6277847dd0d0337a802fa4437e8d2ff60

commit 3922d7f6277847dd0d0337a802fa4437e8d2ff60
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:23:59 +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 d405df99558e..1907aa0f9f5f 100644
--- a/sys/netpfil/ipfilter/netinet/ip_htable.c
+++ b/sys/netpfil/ipfilter/netinet/ip_htable.c
@@ -606,7 +606,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;
 
@@ -976,7 +976,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];
@@ -984,7 +983,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;
@@ -996,7 +994,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