diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-10 00:00:59 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-10 00:00:59 (EST) |
commit | dc23bec5af327cff093dc471441124944c39cc9c (patch) | |
tree | 83adfb0244b66655373d56167e2d26923dc1f96a /libopkg/opkg_remove.c | |
parent | 6e59ec90af245ddf2d2534981fa0eb7804a8686d (diff) |
Remove opkg_internal_use_only and fix associated assumptions RE pkg->provides.
It appears that the opkg_internal_use_only provides string was introduced to
bandaid over problems with assuming that the pkg->provides, pkg->provides_str
and pkg->provides_count are all the same length. As each pkg provides itself,
the pkg->provides array was one longer than the str and count fields. Most of
the uses of pkg->provides did not take this into account.
This behaviour has been changed. pkg->provides is now pkg->provides_count long
and it is pkg->provides_str which is shorter by one.
Associated dead code has also been removed.
git-svn-id: http://opkg.googlecode.com/svn/trunk@277 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg_remove.c')
-rw-r--r-- | libopkg/opkg_remove.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c index ec7540b..12d5d0c 100644 --- a/libopkg/opkg_remove.c +++ b/libopkg/opkg_remove.c @@ -39,7 +39,7 @@ int pkg_has_installed_dependents(opkg_conf_t *conf, abstract_pkg_t *parent_apkg, abstract_pkg_t **provides = pkg->provides; int n_installed_dependents = 0; int i; - for (i = 0; i <= nprovides; i++) { + for (i = 0; i < nprovides; i++) { abstract_pkg_t *providee = provides[i]; abstract_pkg_t **dependers = providee->depended_upon_by; abstract_pkg_t *dep_ab_pkg; @@ -58,7 +58,7 @@ int pkg_has_installed_dependents(opkg_conf_t *conf, abstract_pkg_t *parent_apkg, abstract_pkg_t **dependents = xcalloc((n_installed_dependents+1), sizeof(abstract_pkg_t *)); *pdependents = dependents; - for (i = 0; i <= nprovides; i++) { + for (i = 0; i < nprovides; i++) { abstract_pkg_t *providee = provides[i]; abstract_pkg_t **dependers = providee->depended_upon_by; abstract_pkg_t *dep_ab_pkg; |