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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user