xbps_repository_pool_foreach: use SIMPLEQ_FOREACH_SAFE.

This commit is contained in:
Juan RP 2011-01-30 15:09:18 +01:00
parent ec15af17a0
commit e04f167d09

View File

@ -213,7 +213,7 @@ xbps_repository_pool_foreach(
int (*fn)(struct repository_pool_index *, void *, bool *),
void *arg)
{
struct repository_pool *rpool;
struct repository_pool *rpool, *rpool_new;
int rv = 0;
bool done = false;
@ -222,7 +222,7 @@ xbps_repository_pool_foreach(
if (!repolist_initialized)
return EINVAL;
SIMPLEQ_FOREACH(rpool, &rpool_queue, rp_entries) {
SIMPLEQ_FOREACH_SAFE(rpool, &rpool_queue, rp_entries, rpool_new) {
rv = (*fn)(rpool->rpi, arg, &done);
if (rv != 0 || done)
break;