summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-03-12 16:56:17 +0000
committerjbj <devnull@localhost>2002-03-12 16:56:17 +0000
commitd18bbd9bdcfaf031e5ca7b6acd5bcc4d2532d3e4 (patch)
tree935d7f1b209236f6e6876a020d5836eb37afab0c /lib/psm.c
parent0a71efcfc06c380feb5558aaf5de6773229894da (diff)
downloadlibrpm-tizen-d18bbd9bdcfaf031e5ca7b6acd5bcc4d2532d3e4.tar.gz
librpm-tizen-d18bbd9bdcfaf031e5ca7b6acd5bcc4d2532d3e4.tar.bz2
librpm-tizen-d18bbd9bdcfaf031e5ca7b6acd5bcc4d2532d3e4.zip
- drill ts/fi through verify mode, add methods to keep fi abstract.
- use mmap when calculating file digests on verify, ~20% faster. CVS patchset: 5352 CVS date: 2002/03/12 16:56:17
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/psm.c b/lib/psm.c
index 02d0177e0..ce13e67b5 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -1267,7 +1267,8 @@ assert(psm->mi == NULL);
psm->mi = rpmdbFreeIterator(psm->mi);
rc = RPMRC_OK;
- if (fc > 0 && fi->fstates == NULL) {
+ /* XXX lazy alloc here may need to be done elsewhere. */
+ if (fi->fstates == NULL && fc > 0) {
fi->fstates = xmalloc(sizeof(*fi->fstates) * fc);
memset(fi->fstates, RPMFILE_STATE_NORMAL, fc);
}