diff options
author | Michael Schroeder <mls@suse.de> | 2012-01-11 14:12:06 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-01-11 14:12:06 +0100 |
commit | 34fd443de1375fcbc9cd05669f34ba545d329217 (patch) | |
tree | 95b031292fb4b1a0a72318b3edbabc69b0ec08a0 /src/policy.c | |
parent | 893369ba813883756509df77d083ab005a8bea89 (diff) | |
download | libsolv-34fd443de1375fcbc9cd05669f34ba545d329217.tar.gz libsolv-34fd443de1375fcbc9cd05669f34ba545d329217.tar.bz2 libsolv-34fd443de1375fcbc9cd05669f34ba545d329217.zip |
- set pool_id2color, fix comments
Diffstat (limited to 'src/policy.c')
-rw-r--r-- | src/policy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/policy.c b/src/policy.c index 8e3b75a..494072f 100644 --- a/src/policy.c +++ b/src/policy.c @@ -229,7 +229,7 @@ prune_to_recommended(Solver *solv, Queue *plist) if (plist->count - ninst < 2) return; - /* prune to suggested/enhanced*/ + /* prune to suggested/enhanced */ ninst = 0; for (i = j = 0; i < plist->count; i++) { @@ -521,6 +521,8 @@ move_installed_to_front(Pool *pool, Queue *plist) memmove(plist->elements + j + 1, plist->elements + j, (i - j) * sizeof(Id)); plist->elements[j] = p; } + else if (j + 2 == plist->count) + break; /* no need to check last element if all prev ones are installed */ j++; } } @@ -611,7 +613,7 @@ prune_best_arch_name_version(const Solver *solv, Pool *pool, Queue *plist) } /* installed packages involed in a dup operation can only be kept -* if they are identical to a non-installed one */ + * if they are identical to a non-installed one */ static void prune_installed_dup_packages(Solver *solv, Queue *plist) { |