aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/eap_dynamic/eap_dynamic.c
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/plugins/eap_dynamic/eap_dynamic.c
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/plugins/eap_dynamic/eap_dynamic.c')
-rw-r--r--src/libcharon/plugins/eap_dynamic/eap_dynamic.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libcharon/plugins/eap_dynamic/eap_dynamic.c b/src/libcharon/plugins/eap_dynamic/eap_dynamic.c
index 83ccd3a8a..204fb317d 100644
--- a/src/libcharon/plugins/eap_dynamic/eap_dynamic.c
+++ b/src/libcharon/plugins/eap_dynamic/eap_dynamic.c
@@ -69,6 +69,15 @@ static bool entry_matches(eap_vendor_type_t *item, eap_vendor_type_t *other)
return item->type == other->type && item->vendor == other->vendor;
}
+CALLBACK(entry_matches_cb, bool,
+ eap_vendor_type_t *item, va_list args)
+{
+ eap_vendor_type_t *other;
+
+ VA_ARGS_VGET(args, other);
+ return entry_matches(item, other);
+}
+
/**
* Load the given EAP method
*/
@@ -121,8 +130,7 @@ static void select_method(private_eap_dynamic_t *this)
{
if (inner)
{
- if (inner->find_first(inner, (void*)entry_matches,
- NULL, entry) != SUCCESS)
+ if (!inner->find_first(inner, entry_matches_cb, NULL, entry))
{
if (entry->vendor)
{