diff options
author | Michael Schroeder <mls@suse.de> | 2012-11-27 11:26:32 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-11-27 11:26:32 +0100 |
commit | 9eaaeb1ef79617559a51b23acf58f9563478207a (patch) | |
tree | b7bbafe7d15a910a4a6bffff71e31ccd0c6908e3 /src/rules.c | |
parent | f6d2b5c95e7e49ab9dde3d81d1b4442c82d627ed (diff) | |
download | libsolv-9eaaeb1ef79617559a51b23acf58f9563478207a.tar.gz libsolv-9eaaeb1ef79617559a51b23acf58f9563478207a.tar.bz2 libsolv-9eaaeb1ef79617559a51b23acf58f9563478207a.zip |
make FOR_RULELITERALS safe against whatprovides realloc
Should only make iterating a tiny bit slower, but is more safe and
brings the macro in line with the other iterater macros.
Diffstat (limited to 'src/rules.c')
-rw-r--r-- | src/rules.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rules.c b/src/rules.c index 12be39b..d16c423 100644 --- a/src/rules.c +++ b/src/rules.c @@ -2202,7 +2202,7 @@ void solver_ruleliterals(Solver *solv, Id rid, Queue *q) { Pool *pool = solv->pool; - Id p, *pp; + Id p, pp; Rule *r; queue_empty(q); @@ -2246,7 +2246,7 @@ solver_addchoicerules(Solver *solv) Rule *r; Queue q, qi; int i, j, rid, havechoice; - Id p, d, *pp; + Id p, d, pp; Id p2, pp2; Solvable *s, *s2; Id lastaddedp, lastaddedd; @@ -2428,7 +2428,7 @@ solver_addchoicerules(Solver *solv) void solver_disablechoicerules(Solver *solv, Rule *r) { - Id rid, p, *pp; + Id rid, p, pp; Pool *pool = solv->pool; Map m; Rule *or; @@ -2515,7 +2515,7 @@ solver_addbestrules(Solver *solv, int havebestinstalljobs) if ((solv->job.elements[i] & (SOLVER_JOBMASK | SOLVER_FORCEBEST)) == (SOLVER_INSTALL | SOLVER_FORCEBEST)) { int j; - Id p2, *pp2; + Id p2, pp2; for (j = 0; j < solv->ruletojob.count; j++) if (solv->ruletojob.elements[j] == i) break; @@ -2544,7 +2544,7 @@ solver_addbestrules(Solver *solv, int havebestinstalljobs) { FOR_REPO_SOLVABLES(installed, p, s) { - Id d, p2, *pp2; + Id d, p2, pp2; if (!solv->updatemap_all && (!solv->updatemap.size || !MAPTST(&solv->updatemap, p - installed->start))) continue; if (!solv->bestupdatemap_all && (!solv->bestupdatemap.size || !MAPTST(&solv->bestupdatemap, p - installed->start))) @@ -2694,7 +2694,7 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded) Map installedm; Rule *r; Id rid, how, what, select; - Id p, pp, ip, *jp; + Id p, pp, ip, jp; Id req, *reqp, sup, *supp; Solvable *s; Queue iq; |