From: Michael Schroeder Date: Mon, 3 May 2010 15:33:00 +0000 (+0200) Subject: - code cleanup X-Git-Tag: BASE-SuSE-Code-12_1-Branch~158^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b94940f43d45506a3967376750ae4da956f81652;p=platform%2Fupstream%2Flibsolv.git - code cleanup --- diff --git a/src/rules.c b/src/rules.c index c92353b..7e17af4 100644 --- a/src/rules.c +++ b/src/rules.c @@ -1974,9 +1974,8 @@ addchoicerules(Solver *solv) /* called when a choice rule is disabled by analyze_unsolvable. We also * have to disable all other choice rules so that the best packages get * picked */ - void -disablechoicerules(Solver *solv, Rule *r) +solver_disablechoicerules(Solver *solv, Rule *r) { Id rid, p, *pp; Pool *pool = solv->pool; @@ -2005,7 +2004,7 @@ disablechoicerules(Solver *solv, Rule *r) } } -void solver_createcleandepsmap(Solver *solv) +static void solver_createcleandepsmap(Solver *solv) { Pool *pool = solv->pool; Repo *installed = solv->installed; diff --git a/src/rules.h b/src/rules.h index 7ac1c9d..b70b640 100644 --- a/src/rules.h +++ b/src/rules.h @@ -122,6 +122,8 @@ void solver_reenablepolicyrules(struct _Solver *solv, int jobidx); int solver_allruleinfos(struct _Solver *solv, Id rid, Queue *rq); SolverRuleinfo solver_ruleinfo(struct _Solver *solv, Id rid, Id *fromp, Id *top, Id *depp); +/* misc functions */ +void solver_disablechoicerules(struct _Solver *solv, Rule *r); #ifdef __cplusplus } diff --git a/src/solver.c b/src/solver.c index e4effa1..d6c6938 100644 --- a/src/solver.c +++ b/src/solver.c @@ -975,7 +975,6 @@ analyze_unsolvable(Solver *solv, Rule *cr, int disablerules) if (lastweak) { Id v; - extern void disablechoicerules(Solver *solv, Rule *r); /* disable last weak rule */ solv->problems.count = oldproblemcount; solv->learnt_pool.count = oldlearntpoolcount; @@ -986,7 +985,7 @@ analyze_unsolvable(Solver *solv, Rule *cr, int disablerules) POOL_DEBUG(SAT_DEBUG_UNSOLVABLE, "disabling "); solver_printruleclass(solv, SAT_DEBUG_UNSOLVABLE, solv->rules + lastweak); if (lastweak >= solv->choicerules && lastweak < solv->choicerules_end) - disablechoicerules(solv, solv->rules + lastweak); + solver_disablechoicerules(solv, solv->rules + lastweak); solver_disableproblem(solv, v); if (v < 0) solver_reenablepolicyrules(solv, -(v + 1));