Minor cleanup to PSM_INIT stage, no functional changes
authorPanu Matilainen <pmatilai@redhat.com>
Sat, 6 Mar 2010 09:34:09 +0000 (11:34 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Sat, 6 Mar 2010 09:35:48 +0000 (11:35 +0200)
- lose redundant RPMRC_OK assignment + cosmetics

lib/psm.c

index 8b41047..78fe1eb 100644 (file)
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -727,7 +727,6 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
        if (psm->goal == PKG_INSTALL) {
            rpmdbMatchIterator mi;
            Header oh;
-           int fc = rpmfiFC(fi);
 
            psm->scriptArg = psm->npkgs_installed + 1;
 
@@ -754,9 +753,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
            rc = RPMRC_OK;
 
            if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB)  break;
-           if (fc <= 0)                                break;
        
-           {   struct rpmtd_s filenames;
+           if (rpmfiFC(fi) > 0) {
+               struct rpmtd_s filenames;
                rpmTag ftag = RPMTAG_FILENAMES;
                Header h = rpmteHeader(psm->te);
        
@@ -767,8 +766,6 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
                fi->apath = filenames.data; /* Ick.. */
                headerFree(h);
            }
-       
-           rc = RPMRC_OK;
        }
        if (psm->goal == PKG_ERASE) {
            psm->scriptArg = psm->npkgs_installed - 1;