]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ipfilter: simplify ipf_proxy_check() return codes
authorCy Schubert <cy@FreeBSD.org>
Tue, 23 Mar 2021 03:11:58 +0000 (20:11 -0700)
committerCy Schubert <cy@FreeBSD.org>
Wed, 24 Mar 2021 08:57:56 +0000 (01:57 -0700)
commit874b1a35486b570513680c3d456b062ba097e1d9
treecb5fa015346dc3003d8dc35ede8012cc3a484e96
parent9e5aeba51b431256adfd18b087ee61b09bfd6a79
ipfilter: simplify ipf_proxy_check() return codes

ipf_proxy_check() returns -1 for an error and 0 or 1 for success.
ipf_proxy_check()'s callers check for error and if the return code
is 0, they change it to 1 prior to returning to their callers. Simply
by returning -1 or 1 we reduce complexity and cycles burned changing
0 to 1.

MFC after: 1 week
sys/contrib/ipfilter/netinet/ip_nat.c
sys/contrib/ipfilter/netinet/ip_nat6.c
sys/contrib/ipfilter/netinet/ip_proxy.c