summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rpmdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index 73187630b..38e1cb53f 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -355,7 +355,7 @@ static int doOpen(rpmdb db, int justPkgs)
{
int rc = pkgdbOpen(db, db->db_flags, NULL);
if (!justPkgs) {
- for (int dbix = 0; dbix < db->db_ndbi; dbix++) {
+ for (int dbix = 0; rc == 0 && dbix < db->db_ndbi; dbix++) {
rc += indexOpen(db, db->db_tags[dbix], db->db_flags, NULL);
}
}