]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Refactor, removing one compare.
authorcy <cy@FreeBSD.org>
Tue, 16 Jul 2019 19:00:38 +0000 (19:00 +0000)
committercy <cy@FreeBSD.org>
Tue, 16 Jul 2019 19:00:38 +0000 (19:00 +0000)
commit0aaf4cae5df76dc49dba5b21c1bae75fc1a53bf0
tree2297009c6d3b342116679bfb57789bd996e20804
parent3e4e5c46acd8ebbed6176283ef66ab601fc97270
Refactor, removing one compare.

This changes the return code however the caller only tests for 0 and != 0.
One might ask then, why multiple return codes when the caller only tests
for 0 and != 0? From what I can tell, Darren probably passed various
return codes for sake of debugging. The debugging code is long gone
however we can still use the different return codes using DTrace FBT
traces. We can still determine why the compare failed by examining the
differences between the fr1 and fr2 frentry structs, which is a simple
test in DTrace. This allows reducing the number of tests, improving the
code while not affecting our ability to capture information for
diagnostic purposes.

MFC after: 1 week
sys/contrib/ipfilter/netinet/fil.c