From: Stephan Kulow Date: Sun, 21 Oct 2007 07:35:23 +0000 (+0000) Subject: fixed mean bug in an optimization of addrule: X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~907 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3367dd203fa6ed5bcd4f6bba93116a7a8f7988f1;p=thirdparty%2Flibsolv.git fixed mean bug in an optimization of addrule: Differ between binary rules and non-binary rules with one literal (e.g. two kernels) (fixed 5 test cases) --- diff --git a/src/solver.c b/src/solver.c index 07373d10..a20b8b39 100644 --- a/src/solver.c +++ b/src/solver.c @@ -623,10 +623,13 @@ addrule(Solver *solv, Id p, Id d) n = 1; /* re-set n, was used as temp var */ } + /* check if the last added rule is exactly the same as what we're looking for. + * Differ between binary rules and non-binary rules with one literal (e.g. two kernels) */ if (r && n == 1 && r->p == p - && r->w2 == d) + && ( ( !r->d && r->w2 == d ) + || r->d == d)) { return r; }