re-compute 's' pointer while iterating repo solvables in order to cope
authorKlaus Kaempf <kkaempf@suse.de>
Thu, 21 Feb 2008 12:47:41 +0000 (12:47 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Thu, 21 Feb 2008 12:47:41 +0000 (12:47 +0000)
with re-allocs happening inside the loop body.

src/repo.h

index 6b823fb..a641541 100644 (file)
@@ -132,7 +132,7 @@ static inline void repo_free_solvable_block(Repo *repo, Id start, int count, int
 }
 
 #define FOR_REPO_SOLVABLES(r, p, s)                                            \
-  for (p = (r)->start, s = (r)->pool->solvables + p; p < (r)->end; p++, s++)   \
+  for (p = (r)->start, s = (r)->pool->solvables + p; p < (r)->end; p++, s = (r)->pool->solvables + p)  \
     if (s->repo == (r))