diff options
author | Cy Schubert <cy@FreeBSD.org> | 2022-01-10 17:45:27 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2022-01-12 20:58:05 +0000 |
commit | f98cc177f7b8afae670f28adf2b88cc00b990bf7 (patch) | |
tree | 9f19f7d7b21ce46a15b062521c190e9f5a0c117e | |
parent | c2705ceaeb09d8579661097fd358ffb5defb5624 (diff) |
ipfilter: Remove redundant else if
Combine two else ifs using an or.
MFC after: 3 days
-rw-r--r-- | sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 6 |
1 files 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 { |