git: c439e17595f4 - stable/12 - ipfilter: Remove redundant else if
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Feb 2022 13:56:11 UTC
The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c439e17595f455fc233c363d231c3e02e792f4ca commit c439e17595f455fc233c363d231c3e02e792f4ca 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:55:14 +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 0eb9ee59a987..315d570141dc 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -1086,10 +1086,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 {