struct compound_depend *cd0, *cd1;
abstract_pkg_t **dependents;
- for (i=0; i<old_pkg->depends_count; i++) {
+ int count0 = old_pkg->pre_depends_count +
+ old_pkg->depends_count +
+ old_pkg->recommends_count +
+ old_pkg->suggests_count;
+ int count1 = pkg->pre_depends_count +
+ pkg->depends_count +
+ pkg->recommends_count +
+ pkg->suggests_count;
+
+ for (i=0; i<count0; i++) {
cd0 = &old_pkg->depends[i];
if (cd0->type != DEPEND)
continue;
found = 0;
- for (k=0; k<pkg->depends_count; k++) {
+ for (k=0; k<count1; k++) {
cd1 = &pkg->depends[i];
if (cd1->type != DEPEND)
continue;
struct compound_depend *cdep;
abstract_pkg_t **dependents;
- for (i=0; i<pkg->depends_count; i++) {
+ int count = pkg->pre_depends_count +
+ pkg->depends_count +
+ pkg->recommends_count +
+ pkg->suggests_count;
+
+ for (i=0; i<count; i++) {
cdep = &pkg->depends[i];
if (cdep->type != DEPEND)
continue;