diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-06-07 14:56:48 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-06-07 14:56:48 +0300 |
commit | 825191fe76b4b9be0062bb46be11bbd823256598 (patch) | |
tree | 4bec8e7a6e2f105cbf893abcd8599646973321dc | |
parent | fe762d20a5d4d23899029cec6ec0280473283c13 (diff) | |
download | librpm-tizen-825191fe76b4b9be0062bb46be11bbd823256598.tar.gz librpm-tizen-825191fe76b4b9be0062bb46be11bbd823256598.tar.bz2 librpm-tizen-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...
-rw-r--r-- | rpmdb/rpmdb.c | 6 |
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); |