summaryrefslogtreecommitdiff
path: root/rpmdb
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-06-07 14:56:48 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-06-07 14:56:48 +0300
commit825191fe76b4b9be0062bb46be11bbd823256598 (patch)
tree4bec8e7a6e2f105cbf893abcd8599646973321dc /rpmdb
parentfe762d20a5d4d23899029cec6ec0280473283c13 (diff)
downloadrpm-825191fe76b4b9be0062bb46be11bbd823256598.tar.gz
rpm-825191fe76b4b9be0062bb46be11bbd823256598.tar.bz2
rpm-825191fe76b4b9be0062bb46be11bbd823256598.zip
Return error codes from rpmdbFindFpList() on "can't happen" situations.
rpmtsRun() already checks it, and those things can happen in some exotic cases like rhbz#106057 as non-root, unless the non-temporary db's are opened before chroot...
Diffstat (limited to 'rpmdb')
-rw-r--r--rpmdb/rpmdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c
index e88c92eef..ce98330ed 100644
--- a/rpmdb/rpmdb.c
+++ b/rpmdb/rpmdb.c
@@ -3404,11 +3404,11 @@ DBT * data;
Header h;
int i, xx;
- if (db == NULL) return 0;
+ if (db == NULL) return 1;
mi = rpmdbInitIterator(db, RPMTAG_BASENAMES, NULL, 0);
if (mi == NULL) /* XXX should never happen */
- return 0;
+ return 1;
key = &mi->mi_key;
data = &mi->mi_data;
@@ -3435,7 +3435,7 @@ if (key->size == 0) key->size++; /* XXX "/" fixup. */
if ((i = rpmdbGetIteratorCount(mi)) == 0) {
mi = rpmdbFreeIterator(mi);
- return 0;
+ return 1;
}
fpc = fpCacheCreate(i);