diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-05-16 12:11:24 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-05-26 13:56:44 +0200 |
commit | 2e4d110d1e94a3be9da06894832492ff469eec37 (patch) | |
tree | db62e4fcd1a955b5179c6f172a9403500bb24e50 /src/libstrongswan/credentials/credential_manager.c | |
parent | 8a2e4d4a8b87f5e8a5e5f663ee8eddd47988fa2c (diff) | |
download | strongswan-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/libstrongswan/credentials/credential_manager.c')
-rw-r--r-- | src/libstrongswan/credentials/credential_manager.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstrongswan/credentials/credential_manager.c b/src/libstrongswan/credentials/credential_manager.c index 5dd8e42b1..0a8d3d101 100644 --- a/src/libstrongswan/credentials/credential_manager.c +++ b/src/libstrongswan/credentials/credential_manager.c @@ -812,11 +812,12 @@ static bool verify_trust_chain(private_credential_manager_t *this, return trusted; } -/** - * List find match function for certificates - */ -static bool cert_equals(certificate_t *a, certificate_t *b) +CALLBACK(cert_equals, bool, + certificate_t *a, va_list args) { + certificate_t *b; + + VA_ARGS_VGET(args, b); return a->equals(a, b); } @@ -896,8 +897,7 @@ METHOD(enumerator_t, trusted_enumerate, bool, continue; } - if (this->failed->find_first(this->failed, (void*)cert_equals, - NULL, current) == SUCCESS) + if (this->failed->find_first(this->failed, cert_equals, NULL, current)) { /* check each candidate only once */ continue; } |