aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/kernel
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-05-16 12:11:24 +0200
committerTobias Brunner <tobias@strongswan.org>2017-05-26 13:56:44 +0200
commit2e4d110d1e94a3be9da06894832492ff469eec37 (patch)
treedb62e4fcd1a955b5179c6f172a9403500bb24e50 /src/libcharon/kernel
parent8a2e4d4a8b87f5e8a5e5f663ee8eddd47988fa2c (diff)
downloadstrongswan-2e4d110d1e94a3be9da06894832492ff469eec37.tar.bz2
strongswan-2e4d110d1e94a3be9da06894832492ff469eec37.tar.xz
linked-list: Change return value of find_first() and signature of its callback
This avoids the unportable five pointer hack.
Diffstat (limited to 'src/libcharon/kernel')
-rw-r--r--src/libcharon/kernel/kernel_interface.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libcharon/kernel/kernel_interface.c b/src/libcharon/kernel/kernel_interface.c
index ea5af9eb8..3d736b25b 100644
--- a/src/libcharon/kernel/kernel_interface.c
+++ b/src/libcharon/kernel/kernel_interface.c
@@ -632,21 +632,18 @@ METHOD(kernel_interface_t, enable_udp_decap, bool,
METHOD(kernel_interface_t, is_interface_usable, bool,
private_kernel_interface_t *this, const char *iface)
{
- status_t expected;
-
if (!this->ifaces_filter)
{
return TRUE;
}
- expected = this->ifaces_exclude ? NOT_FOUND : SUCCESS;
- return this->ifaces_filter->find_first(this->ifaces_filter, (void*)streq,
- NULL, iface) == expected;
+ return this->ifaces_filter->find_first(this->ifaces_filter,
+ linked_list_match_str, NULL, iface) != this->ifaces_exclude;
}
METHOD(kernel_interface_t, all_interfaces_usable, bool,
private_kernel_interface_t *this)
{
- return this->ifaces_filter == NULL;
+ return !this->ifaces_filter;
}
METHOD(kernel_interface_t, get_address_by_ts, status_t,