From e04f167d098afe4150ee963e3c22c09b6bbcad67 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 30 Jan 2011 15:09:18 +0100 Subject: [PATCH] xbps_repository_pool_foreach: use SIMPLEQ_FOREACH_SAFE. --- lib/repository_pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/repository_pool.c b/lib/repository_pool.c index dd306a3a..9523d1a2 100644 --- a/lib/repository_pool.c +++ b/lib/repository_pool.c @@ -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;