summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-05-28 22:26:39 +0300
committerPanu Matilainen <pmatilai@redhat.com>2011-05-28 22:26:39 +0300
commit9f72c7f2cda74172bfe5c6c558f4c20b783ad115 (patch)
tree4933e320619fe17c1545299bc6f3dee3e28a5d65 /lib/psm.c
parente7b55f61a984de68dbe67aad702b845ed4eeff15 (diff)
downloadrpm-9f72c7f2cda74172bfe5c6c558f4c20b783ad115.tar.gz
rpm-9f72c7f2cda74172bfe5c6c558f4c20b783ad115.tar.bz2
rpm-9f72c7f2cda74172bfe5c6c558f4c20b783ad115.zip
Eliminate dead NULL-assignments at scope-end in librpm, part III
- Remove NULL-assignments of local variables at the end of scope from the low-level helper machinery: fsm, psm, rpmscript and rpmrc
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/psm.c b/lib/psm.c
index 5e3dbff7c..d1c8889ed 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -190,7 +190,7 @@ static rpmRC markReplacedFiles(const rpmpsm psm)
}
rpmtdFreeData(&secStates);
}
- mi = rpmdbFreeIterator(mi);
+ rpmdbFreeIterator(mi);
free(offsets);
return RPMRC_OK;
@@ -349,16 +349,16 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
rpmrc = RPMRC_OK;
(void) rpmpsmStage(psm, PSM_FINI);
- psm = rpmpsmFree(psm);
+ rpmpsmFree(psm);
exit:
if (specFilePtr && specFile && rpmrc == RPMRC_OK)
*specFilePtr = specFile;
else
- specFile = _free(specFile);
+ free(specFile);
- if (h != NULL) h = headerFree(h);
- if (fi != NULL) fi = rpmfiFree(fi);
+ headerFree(h);
+ rpmfiFree(fi);
/* XXX nuke the added package(s). */
rpmtsClean(ts);
@@ -557,7 +557,7 @@ static rpmRC handleOneTrigger(const rpmpsm psm,
}
rpmtdFreeData(&pfx);
- trigger = rpmdsFree(trigger);
+ rpmdsFree(trigger);
return rc;
}
@@ -591,7 +591,7 @@ static rpmRC runTriggers(rpmpsm psm)
mi = rpmtsInitIterator(ts, RPMDBI_TRIGGERNAME, N, 0);
while((triggeredH = rpmdbNextIterator(mi)) != NULL)
nerrors += handleOneTrigger(psm, h, triggeredH, numPackage, NULL);
- mi = rpmdbFreeIterator(mi);
+ rpmdbFreeIterator(mi);
psm->countCorrection = countCorrection;
headerFree(h);
}
@@ -636,7 +636,7 @@ static rpmRC runImmedTriggers(rpmpsm psm)
triggersRun);
}
- mi = rpmdbFreeIterator(mi);
+ rpmdbFreeIterator(mi);
}
}
rpmtdFreeData(&tnames);