diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-04-01 10:18:05 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-04-01 10:18:05 +0300 |
commit | e1d100df3a8ecb877ebbaead6ca33c1b635b71c6 (patch) | |
tree | 4be68083bf544e77d4e48b2f5914c2eee5a8ee79 /lib/rpmdb.c | |
parent | c397a09be3efd087afeb25a5b01715eb8c889cdb (diff) | |
download | rpm-e1d100df3a8ecb877ebbaead6ca33c1b635b71c6.tar.gz rpm-e1d100df3a8ecb877ebbaead6ca33c1b635b71c6.tar.bz2 rpm-e1d100df3a8ecb877ebbaead6ca33c1b635b71c6.zip |
Move dbi_no_dbsync logic to inside dbiSync()
- avoids having to check for it in every single caller
Diffstat (limited to 'lib/rpmdb.c')
-rw-r--r-- | lib/rpmdb.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c index 3fdea75ba..35196670e 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -735,8 +735,6 @@ int rpmdbSync(rpmdb db) int xx; if (db->_dbi[dbix] == NULL) continue; - if (db->_dbi[dbix]->dbi_no_dbsync) - continue; xx = dbiSync(db->_dbi[dbix], 0); if (xx && rc == 0) rc = xx; } @@ -2373,8 +2371,7 @@ int rpmdbRemove(rpmdb db, int rid, unsigned int hdrNum, rc = dbiDel(dbi, dbcursor, &key, &data, 0); xx = dbiCclose(dbi, dbcursor, DB_WRITECURSOR); dbcursor = NULL; - if (!dbi->dbi_no_dbsync) - xx = dbiSync(dbi, 0); + xx = dbiSync(dbi, 0); continue; } @@ -2460,8 +2457,7 @@ cont: xx = dbiCclose(dbi, dbcursor, DB_WRITECURSOR); dbcursor = NULL; - if (!dbi->dbi_no_dbsync) - xx = dbiSync(dbi, 0); + xx = dbiSync(dbi, 0); rpmtdFreeData(&tagdata); } @@ -2617,8 +2613,7 @@ int rpmdbAdd(rpmdb db, int iid, Header h, data.size = 0; xx = dbiCclose(dbi, dbcursor, DB_WRITECURSOR); dbcursor = NULL; - if (!dbi->dbi_no_dbsync) - xx = dbiSync(dbi, 0); + xx = dbiSync(dbi, 0); continue; break; case RPMTAG_REQUIRENAME: @@ -2731,8 +2726,7 @@ cont: xx = dbiCclose(dbi, dbcursor, DB_WRITECURSOR); dbcursor = NULL; - if (!dbi->dbi_no_dbsync) - xx = dbiSync(dbi, 0); + xx = dbiSync(dbi, 0); rpmtdFreeData(&tagdata); } |