added some assertions
authorewt <devnull@localhost>
Tue, 13 Apr 1999 17:26:43 +0000 (17:26 +0000)
committerewt <devnull@localhost>
Tue, 13 Apr 1999 17:26:43 +0000 (17:26 +0000)
CVS patchset: 2990
CVS date: 1999/04/13 17:26:43

lib/depends.c

index ac2bd20..ebb45ab 100644 (file)
@@ -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;