From: Panu Matilainen Date: Wed, 28 May 2008 06:41:34 +0000 (+0300) Subject: Eliminate ill-indented block obfuscating the code X-Git-Tag: rpm-4.6.0-rc1~450 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=827a800687140df56e446b4752ac9c7bd5613d0e;p=platform%2Fupstream%2Frpm.git Eliminate ill-indented block obfuscating the code --- diff --git a/lib/rpmdb.c b/lib/rpmdb.c index a1bb89e..59eaa10 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -2783,8 +2783,10 @@ int rpmdbAdd(rpmdb db, int iid, Header h, tagdata.count = 1; } - dbi = dbiOpen(db, rpmtag, 0); - if (dbi != NULL) { + if (!(dbi = dbiOpen(db, rpmtag, 0))) { + rpmtdFreeData(&tagdata); + continue; + } xx = dbiCopen(dbi, dbi->dbi_txnid, &dbcursor, DB_WRITECURSOR); logAddRemove(0, &tagdata); @@ -2874,7 +2876,6 @@ int rpmdbAdd(rpmdb db, int iid, Header h, if (!dbi->dbi_no_dbsync) xx = dbiSync(dbi, 0); - } rpmtdFreeData(&tagdata); }