HomeClusterLabs Projects

[IPv6addr] Merge duplicated code from find_if() and get_if() into scan_if()

Description

[IPv6addr] Merge duplicated code from find_if() and get_if() into scan_if()
I notice that find_if() and get_if() share a non-trivial amount of code.
The only difference between these two functions is that the latter
constructs and uses a mask, whereas the former only looks for an exact
match. By creating a new function scan_if(), with a switch telling
it weather or not to construct a mask based on the prefix - the default
mask is all 1s, or in otherwords an exact match - the code
duplication is removed.

--HG--
extra : convert_revision : aec55b384434ed099113384a59971ae73ec2de5e

Details

Provenance
Horms <horms@verge.net.au>Authored on Apr 18 2007, 11:33 PM
Parents
rRc868f980077b: [IPv6addr] Use memset to set mask in find_if()
Branches
Unknown
Tags
Unknown

Event Timeline