git: 80bbd5a14914 - stable/13 - ipfilter: Remove redundant else if

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Mon, 07 Feb 2022 13:52:12 UTC
The branch stable/13 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=80bbd5a1491422d52db5f69e5100ddf0c2c21a1f

commit 80bbd5a1491422d52db5f69e5100ddf0c2c21a1f
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-01-10 17:45:27 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-02-07 13:51:18 +0000

    ipfilter: Remove redundant else if
    
    Combine two else ifs using an or.
    
    (cherry picked from commit f98cc177f7b8afae670f28adf2b88cc00b990bf7)
---
 sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
index 986cca30c94d..72e2a42695c4 100644
--- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
+++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
@@ -1081,10 +1081,8 @@ ipf_checkv4sum(fr_info_t *fin)
 			fin->fin_cksum = FI_CK_L4FULL;
 			return (0);
 		} else if (m->m_pkthdr.csum_flags == CSUM_TCP ||
-			   m->m_pkthdr.csum_flags == CSUM_UDP) {
-			fin->fin_cksum = FI_CK_L4PART;
-			return (0);
-		} else if (m->m_pkthdr.csum_flags == CSUM_IP) {
+			   m->m_pkthdr.csum_flags == CSUM_UDP ||
+			   m->m_pkthdr.csum_flags == CSUM_IP) {
 			fin->fin_cksum = FI_CK_L4PART;
 			return (0);
 		} else {