linked-list: Change return value of find_first() and signature of its callback

This avoids the unportable five pointer hack.
This commit is contained in:
Tobias Brunner
2017-05-26 13:56:44 +02:00
parent 8a2e4d4a8b
commit 2e4d110d1e
29 changed files with 526 additions and 398 deletions
+6 -5
View File
@@ -811,11 +811,12 @@ METHOD(crypto_factory_t, remove_dh, void,
this->lock->unlock(this->lock);
}
/**
* match algorithms of an entry?
*/
static bool entry_match(entry_t *a, entry_t *b)
CALLBACK(entry_match, bool,
entry_t *a, va_list args)
{
entry_t *b;
VA_ARGS_VGET(args, b);
return a->algo == b->algo;
}
@@ -828,7 +829,7 @@ CALLBACK(unique_check, bool,
while (orig->enumerate(orig, &entry))
{
if (list->find_first(list, (void*)entry_match, NULL, entry) == SUCCESS)
if (list->find_first(list, entry_match, NULL, entry))
{
continue;
}