diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-27 21:33:28 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-28 09:45:34 +0300 |
commit | 27557a00d57974a17b8af933ce8c6f1ebfeb76b5 (patch) | |
tree | 218d71f7844cf304c94bc64667fc249eee1d2885 /lib/rpmdb.c | |
parent | f55661ff4d89ab46c1bfb332a3c8f29b548a0688 (diff) | |
download | rpm-27557a00d57974a17b8af933ce8c6f1ebfeb76b5.tar.gz rpm-27557a00d57974a17b8af933ce8c6f1ebfeb76b5.tar.bz2 rpm-27557a00d57974a17b8af933ce8c6f1ebfeb76b5.zip |
Eliminate ill-indented block obfuscating the code
Diffstat (limited to 'lib/rpmdb.c')
-rw-r--r-- | lib/rpmdb.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c index b3527f282..8fd871b77 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -2386,7 +2386,7 @@ int rpmdbRemove(rpmdb db, int rid, unsigned int hdrNum, for (dbix = 0; dbix < dbiTags.max; dbix++) { dbiIndex dbi; rpmTag rpmtag; - int xx; + int xx, printed = 0; struct rpmtd_s tagdata; dbi = NULL; @@ -2425,11 +2425,11 @@ int rpmdbRemove(rpmdb db, int rid, unsigned int hdrNum, if (!headerGet(h, rpmtag, &tagdata, HEADERGET_MINMEM)) continue; - dbi = dbiOpen(db, rpmtag, 0); - if (dbi != NULL) { - int printed; - - printed = 0; + if (!(dbi = dbiOpen(db, rpmtag, 0))) { + rpmtdFreeData(&tagdata); + continue; + } + xx = dbiCopen(dbi, dbi->dbi_txnid, &dbcursor, DB_WRITECURSOR); rpmtdInit(&tagdata); while (rpmtdNext(&tagdata) >= 0) { @@ -2574,7 +2574,6 @@ int rpmdbRemove(rpmdb db, int rid, unsigned int hdrNum, if (!dbi->dbi_no_dbsync) xx = dbiSync(dbi, 0); - } rpmtdFreeData(&tagdata); } |