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:
@@ -151,8 +151,7 @@ METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*,
|
||||
identification_t *id;
|
||||
host_t *vip;
|
||||
|
||||
if (pools->find_first(pools, (linked_list_match_t)streq,
|
||||
NULL, "dhcp") != SUCCESS)
|
||||
if (!pools->find_first(pools, linked_list_match_str, NULL, "dhcp"))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -382,8 +382,7 @@ METHOD(dhcp_socket_t, enroll, dhcp_transaction_t*,
|
||||
while (try <= DHCP_TRIES && discover(this, transaction))
|
||||
{
|
||||
if (!this->condvar->timed_wait(this->condvar, this->mutex, 1000 * try) &&
|
||||
this->request->find_first(this->request, NULL,
|
||||
(void**)&transaction) == SUCCESS)
|
||||
this->request->find_first(this->request, NULL, (void**)&transaction))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user