summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-12-09 01:24:29 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-12-09 01:24:29 (EST)
commit6642bca1751d698f9098adf80c069c84bbc7aa52 (patch)
tree3cab9741ff03a95fa767a0bea4d654bb4bad1d65 /libopkg
parent9b0b4b31e4bb13f4ae77bc0841fe9400ec3898c1 (diff)
Fix infinite loop created when I removed the masked variable i.
git-svn-id: http://opkg.googlecode.com/svn/trunk@477 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/pkg_hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c
index 06a0ac5..5b4fe4b 100644
--- a/libopkg/pkg_hash.c
+++ b/libopkg/pkg_hash.c
@@ -137,7 +137,7 @@ pkg_hash_fetch_best_installation_candidate(abstract_pkg_t *apkg,
int (*constraint_fcn)(pkg_t *pkg, void *cdata),
void *cdata, int quiet)
{
- int i;
+ int i, j;
int nprovides = 0;
int nmatching = 0;
int wrong_arch_found = 0;
@@ -212,8 +212,8 @@ pkg_hash_fetch_best_installation_candidate(abstract_pkg_t *apkg,
int max_count = 0;
/* count packages matching max arch priority and keep track of last one */
- for (i = 0; i < vec->len; i++) {
- pkg_t *maybe = vec->pkgs[i];
+ for (j=0; j<vec->len; j++) {
+ pkg_t *maybe = vec->pkgs[j];
opkg_msg(DEBUG, "%s arch=%s arch_priority=%d version=%s.\n",
maybe->name, maybe->architecture,
maybe->arch_priority, maybe->version);