diff options
author | jbj <devnull@localhost> | 2003-12-26 16:14:49 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2003-12-26 16:14:49 +0000 |
commit | 47abfc1242177db364b0bd78d5658ed35a0fe469 (patch) | |
tree | d37254ddc18930a21ef4c2c4dca4bb1bbccbf7b8 | |
parent | 23ddd50de97a301a7c7a402b8d3ee4b3cc26355b (diff) | |
download | rpm-47abfc1242177db364b0bd78d5658ed35a0fe469.tar.gz rpm-47abfc1242177db364b0bd78d5658ed35a0fe469.tar.bz2 rpm-47abfc1242177db364b0bd78d5658ed35a0fe469.zip |
Make sure no. of added provides matches added list size if some
dependencies are skipped due to coloring (#103865).
CVS patchset: 7010
CVS date: 2003/12/26 16:14:49
-rw-r--r-- | lib/rpmal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rpmal.c b/lib/rpmal.c index b6cdea3f6..149beb285 100644 --- a/lib/rpmal.c +++ b/lib/rpmal.c @@ -598,11 +598,13 @@ void rpmalMakeIndex(rpmal al) ai->index = xrealloc(ai->index, ai->size * sizeof(*ai->index)); ai->k = 0; - for (i = 0; i < al->size; i++) { alp = al->list + i; rpmalAddProvides(al, (alKey)i, alp->provides, alp->tscolor); } + + /* Reset size to the no. of provides added. */ + ai->size = ai->k; qsort(ai->index, ai->size, sizeof(*ai->index), indexcmp); } |