summaryrefslogtreecommitdiff
path: root/lib/depends.c
diff options
context:
space:
mode:
authorewt <devnull@localhost>1999-04-13 17:26:43 +0000
committerewt <devnull@localhost>1999-04-13 17:26:43 +0000
commitf5f4de42eca22ea8004becd62d35791c4f3171e2 (patch)
tree3b62492351cb736ba7f1c8fad9eca85635c2f044 /lib/depends.c
parent6ca17d58f45fc8815e88bdd75d376910b8687b4b (diff)
downloadlibrpm-tizen-f5f4de42eca22ea8004becd62d35791c4f3171e2.tar.gz
librpm-tizen-f5f4de42eca22ea8004becd62d35791c4f3171e2.tar.bz2
librpm-tizen-f5f4de42eca22ea8004becd62d35791c4f3171e2.zip
added some assertions
CVS patchset: 2990 CVS date: 1999/04/13 17:26:43
Diffstat (limited to 'lib/depends.c')
-rw-r--r--lib/depends.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/depends.c b/lib/depends.c
index ac2bd20c4..ebb45ab3e 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -975,6 +975,8 @@ int rpmdepOrder(rpmTransactionSet rpmdep) {
j++;
}
}
+ if (j > rpmdep->addedPackages.size) abort();
+
qsort(orderList, rpmdep->addedPackages.size, sizeof(*orderList),
orderListIndexCmp);
@@ -1003,6 +1005,8 @@ int rpmdepOrder(rpmTransactionSet rpmdep) {
}
}
+ if (newOrderCount != rpmdep->orderCount) abort();
+
free(rpmdep->order);
rpmdep->order = newOrder;
rpmdep->orderAlloced = rpmdep->orderCount;