diff options
Diffstat (limited to 'libopkg')
-rw-r--r-- | libopkg/pkg_hash.c | 1 | ||||
-rw-r--r-- | libopkg/pkg_vec.c | 13 |
2 files changed, 6 insertions, 8 deletions
diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index d6a062d..aaa6974 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -203,6 +203,7 @@ pkg_t *pkg_hash_fetch_best_installation_candidate(opkg_conf_t *conf, abstract_pk for (i = 0; i < nprovides; i++) { abstract_pkg_t *provider_apkg = provided_apkgs[i]; opkg_message(conf, OPKG_DEBUG, " adding %s to providers\n", provider_apkg->name); + printf(" adding %s to providers\n", provider_apkg->name); abstract_pkg_vec_insert(providers, provider_apkg); } nprovides = providers->len; diff --git a/libopkg/pkg_vec.c b/libopkg/pkg_vec.c index 819a135..84b9799 100644 --- a/libopkg/pkg_vec.c +++ b/libopkg/pkg_vec.c @@ -104,16 +104,13 @@ pkg_t *pkg_vec_insert_merge(pkg_vec_t *vec, pkg_t *pkg, int set_status,opkg_conf } } +int pkg_vec_insert_called=0; void pkg_vec_insert(pkg_vec_t *vec, const pkg_t *pkg) { - int found = 0; - - /* we didn't find one, add it */ - if(!found){ - vec->pkgs = (pkg_t **)realloc(vec->pkgs, (vec->len + 1) * sizeof(pkg_t *)); - *(const pkg_t **)&vec->pkgs[vec->len] = pkg; - vec->len++; - } + vec->pkgs = (pkg_t **)realloc(vec->pkgs, (vec->len + 1) * sizeof(pkg_t *)); + pkg_vec_insert_called++; + *(const pkg_t **)&vec->pkgs[vec->len] = pkg; + vec->len++; } int pkg_vec_contains(pkg_vec_t *vec, pkg_t *apkg) |