summaryrefslogtreecommitdiff
path: root/rpmdb/rpmdb.h
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-07-04 21:08:05 +0000
committerjbj <devnull@localhost>2002-07-04 21:08:05 +0000
commit6dca216517ffb04f30d84ce1d1335efc37e7736d (patch)
tree0321a51a42d454fb20473111111ea4d983c061ea /rpmdb/rpmdb.h
parentaf3c677f06687e5ad1e33eb24f984c7ac5ff2a33 (diff)
downloadrpm-6dca216517ffb04f30d84ce1d1335efc37e7736d.tar.gz
rpm-6dca216517ffb04f30d84ce1d1335efc37e7736d.tar.bz2
rpm-6dca216517ffb04f30d84ce1d1335efc37e7736d.zip
- fix: forgot lazy open of database on --freshen path (#67907).
- proof-of-concept rpmcache functionality. CVS patchset: 5539 CVS date: 2002/07/04 21:08:05
Diffstat (limited to 'rpmdb/rpmdb.h')
-rw-r--r--rpmdb/rpmdb.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/rpmdb/rpmdb.h b/rpmdb/rpmdb.h
index 459636635..cf2353550 100644
--- a/rpmdb/rpmdb.h
+++ b/rpmdb/rpmdb.h
@@ -543,7 +543,7 @@ int dbiDel(dbiIndex dbi, /*@null@*/ DBC * dbcursor, DBT * key, DBT * data,
/*@globals fileSystem @*/
/*@modifies *dbcursor, fileSystem @*/
{
- assert(key->size > 0);
+ assert(key->data != NULL && key->size > 0);
return (dbi->dbi_vec->cdel) (dbi, dbcursor, key, data, flags);
}
@@ -562,7 +562,7 @@ int dbiGet(dbiIndex dbi, /*@null@*/ DBC * dbcursor, DBT * key, DBT * data,
/*@globals fileSystem @*/
/*@modifies *dbcursor, *key, *data, fileSystem @*/
{
- assert((flags == DB_NEXT) || key->size > 0);
+ assert((flags == DB_NEXT) || (key->data != NULL && key->size > 0));
return (dbi->dbi_vec->cget) (dbi, dbcursor, key, data, flags);
}
@@ -582,7 +582,7 @@ int dbiPget(dbiIndex dbi, /*@null@*/ DBC * dbcursor,
/*@globals fileSystem @*/
/*@modifies *dbcursor, *key, *pkey, *data, fileSystem @*/
{
- assert((flags == DB_NEXT) || key->size > 0);
+ assert((flags == DB_NEXT) || (key->data != NULL && key->size > 0));
return (dbi->dbi_vec->cpget) (dbi, dbcursor, key, pkey, data, flags);
}
@@ -601,7 +601,7 @@ int dbiPut(dbiIndex dbi, /*@null@*/ DBC * dbcursor, DBT * key, DBT * data,
/*@globals fileSystem @*/
/*@modifies *dbcursor, *key, fileSystem @*/
{
- assert(key->size > 0);
+ assert(key->data != NULL && key->size > 0 && data->data != NULL && data->size > 0);
return (dbi->dbi_vec->cput) (dbi, dbcursor, key, data, flags);
}