Author: schubi2 Date: Tue Feb 5 12:24:28 2008 New Revision: 8468 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8468&view=rev Log: bugfix Modified: trunk/sat-solver/testsuite/deptestomatic.c Modified: trunk/sat-solver/testsuite/deptestomatic.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/testsuite/deptestomatic.c?rev=8468&r1=8467&r2=8468&view=diff ============================================================================== --- trunk/sat-solver/testsuite/deptestomatic.c (original) +++ trunk/sat-solver/testsuite/deptestomatic.c Tue Feb 5 12:24:28 2008 @@ -40,6 +40,7 @@ #define MAXNAMELEN 100 + static Pool *decision_data; /*-----------------------------------------------------------------*/ @@ -55,6 +56,11 @@ int r; Id a = *(Id *)ap; Id b = *(Id *)bp; + if (a<0) a = -a; + if (b<0) b = -b; + if (a == SYSTEMSOLVABLE + || b == SYSTEMSOLVABLE) + return 0; r = pool->solvables[a].name - pool->solvables[b].name; if (r) { @@ -79,7 +85,6 @@ return a - b; } - static void err( const char *msg, ...) { @@ -1458,7 +1463,7 @@ /* sorting */ decision_data = solv->pool; - qsort(solv->decisionq.elements, solv->decisionq.count, sizeof(Id), decision_sortcmp); + qsort(solv->decisionq.elements, solv->decisionq.count, sizeof(Id), decision_sortcmp); for (i = 0; i < solv->decisionq.count; i++) { -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org